Merge pull request #1372 from d4ilys/master

修复ClickHouse CodeFirst创建表Bug
This commit is contained in:
2881099 2022-12-09 11:43:45 +08:00 committed by GitHub
commit 37638a589b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -491,13 +491,20 @@ where a.database in ({0}) and a.table in ({1})", tboldname ?? tbname);
}
}
string CkNullablePrimaryAdapter(string dbType, bool isPrimary)
{
return isPrimary
? dbType.Replace("Nullable(", "").Replace(")", "")
: dbType.Replace(" NOT NULL", "");
}
string CkNullableAdapter(string dbType, bool isPrimary)
{
return isPrimary
? dbType.Replace("Nullable(", "").Replace(") NOT NULL", "")
? dbType.Replace("Nullable(", "").Replace(")","").Replace(" NOT NULL", "")
: dbType.Replace(" NOT NULL", "");
}
string CkIntAdapter(string dbType)
{
var result = dbType;