mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-07-16 07:57:33 +08:00
-
This commit is contained in:
parent
2dcd4ca481
commit
fce2e2be9b
@ -246,7 +246,7 @@ namespace SqlSugar
|
|||||||
var columnName= this.SqlBuilder.GetTranslationColumnName(columnInfo.DbColumnName);
|
var columnName= this.SqlBuilder.GetTranslationColumnName(columnInfo.DbColumnName);
|
||||||
string sql = GetUpdateColumnSql(tableName, columnInfo);
|
string sql = GetUpdateColumnSql(tableName, columnInfo);
|
||||||
this.Context.Ado.ExecuteCommand(sql);
|
this.Context.Ado.ExecuteCommand(sql);
|
||||||
var isnull = columnInfo.IsNullable?" SET NOT NULL ":" DROP NOT NULL ";
|
var isnull = columnInfo.IsNullable?" DROP NOT NULL ": " SET NOT NULL ";
|
||||||
this.Context.Ado.ExecuteCommand(string.Format("alter table {0} alter {1} {2}",tableName,columnName, isnull));
|
this.Context.Ado.ExecuteCommand(string.Format("alter table {0} alter {1} {2}",tableName,columnName, isnull));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -257,6 +257,10 @@ namespace SqlSugar
|
|||||||
tableName = this.SqlBuilder.GetTranslationTableName(tableName);
|
tableName = this.SqlBuilder.GetTranslationTableName(tableName);
|
||||||
string dataSize = GetSize(columnInfo);
|
string dataSize = GetSize(columnInfo);
|
||||||
string dataType = columnInfo.DataType;
|
string dataType = columnInfo.DataType;
|
||||||
|
if (!string.IsNullOrEmpty(dataType))
|
||||||
|
{
|
||||||
|
dataType = " type " + dataType;
|
||||||
|
}
|
||||||
string nullType = "";
|
string nullType = "";
|
||||||
string primaryKey = null;
|
string primaryKey = null;
|
||||||
string identity = null;
|
string identity = null;
|
||||||
|
Loading…
Reference in New Issue
Block a user