mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-05 17:37:58 +08:00
Update mysql
This commit is contained in:
parent
d003d5e08d
commit
d0e3efd9d8
@ -341,6 +341,10 @@ namespace SqlSugar.MySqlConnector
|
||||
{
|
||||
if (item.ColumnDescription != null)
|
||||
{
|
||||
if (item.UnderType == UtilConstants.GuidType && item.Length == 0)
|
||||
{
|
||||
item.Length = 36;
|
||||
}
|
||||
var mySqlCodeFirst = this.Context.CodeFirst as MySqlCodeFirst;
|
||||
string sql = GetUpdateColumnSql(entity.DbTableName, mySqlCodeFirst.GetEntityColumnToDbColumn(entity, entity.DbTableName, item))+" "+(item.IsIdentity? "AUTO_INCREMENT" : "")+" " + " COMMENT '" + item.ColumnDescription + "'";
|
||||
db.Ado.ExecuteCommand(sql);
|
||||
|
@ -342,6 +342,10 @@ namespace SqlSugar
|
||||
if (item.ColumnDescription != null)
|
||||
{
|
||||
var mySqlCodeFirst = this.Context.CodeFirst as MySqlCodeFirst;
|
||||
if (item.UnderType == UtilConstants.GuidType&&item.Length==0)
|
||||
{
|
||||
item.Length = 36;
|
||||
}
|
||||
string sql = GetUpdateColumnSql(entity.DbTableName, mySqlCodeFirst.GetEntityColumnToDbColumn(entity, entity.DbTableName, item))+" "+(item.IsIdentity? "AUTO_INCREMENT" : "")+" " + " COMMENT '" + item.ColumnDescription + "'";
|
||||
db.Ado.ExecuteCommand(sql);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user