mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-11-26 10:19:40 +08:00
Update CodeFirst
This commit is contained in:
@@ -393,6 +393,7 @@ namespace SqlSugar
|
||||
if (entityInfo.IsCreateTableFiledSort)
|
||||
{
|
||||
columns = columns.OrderBy(c => c.CreateTableFieldSort).ToList();
|
||||
columns = columns.OrderBy(it => it.IsPrimarykey ? 0 : 1).ToList();
|
||||
}
|
||||
}
|
||||
this.Context.DbMaintenance.CreateTable(tableName, columns, true);
|
||||
|
||||
Reference in New Issue
Block a user