- 修复 Firebird CodeFirst.SyncStructure 自增错误;d154a463a5d239c0a4ce848f2ac9c75dca84ec55

This commit is contained in:
2881099
2022-12-02 22:13:35 +08:00
parent ad0df485a3
commit e3d526ec6d
4 changed files with 33 additions and 4 deletions

View File

@ -516,7 +516,9 @@ namespace FreeSql.Internal
foreach (var col in trytb.Primarys)
{
col.Attribute.IsNullable = false;
col.Attribute.DbType = col.Attribute.DbType.Replace("NOT NULL", "").Replace(" NULL", "").Trim() + " NOT NULL"; //sqlite 主键也可以插入 null
col.Attribute.DbType = col.Attribute.DbType.Replace("NOT NULL", "").Replace(" NULL", "").Trim();
if (common._orm.Ado.DataType == DataType.Sqlite)
col.Attribute.DbType += " NOT NULL"; //sqlite 主键也可以插入 null
}
foreach (var col in trytb.Columns.Values)
{