Browse Source

-

pull/12/MERGE
sunkaixuan 8 years ago
parent
commit
2ca86984ae
  1. 1
      SqlSugar/Abstract/CodeFirstProvider/CodeFirstProvider.cs

1
SqlSugar/Abstract/CodeFirstProvider/CodeFirstProvider.cs

@ -154,6 +154,7 @@ namespace SqlSugar
this.Context.DbMaintenance.DropConstraint(tableName, constraintName);
this.Context.DbMaintenance.DropColumn(tableName, item.DbColumnName);
this.Context.DbMaintenance.AddColumn(tableName, EntityColumnToDbColumn(entityInfo, tableName, item));
if (item.IsPrimarykey)
this.Context.DbMaintenance.AddPrimaryKey(tableName, item.DbColumnName);
}
}

Loading…
Cancel
Save