mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-05-18 05:59:34 +08:00
Update CodeFirst
This commit is contained in:
parent
384af91b02
commit
2a64002ed2
@ -393,6 +393,7 @@ namespace SqlSugar
|
|||||||
if (entityInfo.IsCreateTableFiledSort)
|
if (entityInfo.IsCreateTableFiledSort)
|
||||||
{
|
{
|
||||||
columns = columns.OrderBy(c => c.CreateTableFieldSort).ToList();
|
columns = columns.OrderBy(c => c.CreateTableFieldSort).ToList();
|
||||||
|
columns = columns.OrderBy(it => it.IsPrimarykey ? 0 : 1).ToList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.Context.DbMaintenance.CreateTable(tableName, columns, true);
|
this.Context.DbMaintenance.CreateTable(tableName, columns, true);
|
||||||
|
Loading…
Reference in New Issue
Block a user