mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-04-22 02:32:50 +08:00
- 修复 Firebird CodeFirst 索引 DESC 问题;#1413
This commit is contained in:
parent
7a82d5f6ad
commit
af44fdadb0
@ -136,6 +136,7 @@ namespace FreeSql.Firebird
|
|||||||
{
|
{
|
||||||
sb.Append("CREATE ");
|
sb.Append("CREATE ");
|
||||||
if (uk.IsUnique) sb.Append("UNIQUE ");
|
if (uk.IsUnique) sb.Append("UNIQUE ");
|
||||||
|
if (uk.Columns.Any(a => a.IsDesc)) sb.Append("DESC ");
|
||||||
sb.Append("INDEX ").Append(_commonUtils.QuoteSqlName(ReplaceIndexName(uk.Name, tbname))).Append(" ON ").Append(createTableName).Append("(");
|
sb.Append("INDEX ").Append(_commonUtils.QuoteSqlName(ReplaceIndexName(uk.Name, tbname))).Append(" ON ").Append(createTableName).Append("(");
|
||||||
foreach (var tbcol in uk.Columns)
|
foreach (var tbcol in uk.Columns)
|
||||||
{
|
{
|
||||||
@ -262,7 +263,6 @@ where trim(d.rdb$relation_name) = {0}", tboldname ?? tbname);
|
|||||||
foreach (var tbcol in uk.Columns)
|
foreach (var tbcol in uk.Columns)
|
||||||
{
|
{
|
||||||
sb.Append(_commonUtils.QuoteSqlName(tbcol.Column.Attribute.Name));
|
sb.Append(_commonUtils.QuoteSqlName(tbcol.Column.Attribute.Name));
|
||||||
//if (tbcol.IsDesc) sb.Append(" DESC");
|
|
||||||
sb.Append(", ");
|
sb.Append(", ");
|
||||||
}
|
}
|
||||||
sb.Remove(sb.Length - 2, 2).Append(");\r\n");
|
sb.Remove(sb.Length - 2, 2).Append(");\r\n");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user