|
|
@ -29,6 +29,10 @@ namespace SqlSugar |
|
|
|
DbColumnInfo dbColumnInfo = this.EntityColumnToDbColumn(entityInfo, tableName, item); |
|
|
|
columns.Add(dbColumnInfo); |
|
|
|
} |
|
|
|
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); |
|
|
|