mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-07-15 14:04:44 +08:00
Synchronization code
This commit is contained in:
parent
38598bce9c
commit
6aa6ada781
@ -360,6 +360,10 @@ namespace SqlSugar
|
|||||||
var schema = tableName.Split('.').First();
|
var schema = tableName.Split('.').First();
|
||||||
tableName = tableName.Split('.').Last();
|
tableName = tableName.Split('.').Last();
|
||||||
var temp = this.DeleteColumnRemarkSql.Replace(",dbo,", $",{schema},");
|
var temp = this.DeleteColumnRemarkSql.Replace(",dbo,", $",{schema},");
|
||||||
|
if (!schema.EqualCase("dbo"))
|
||||||
|
{
|
||||||
|
temp = temp.Replace("N'user'", $"N'schema'");
|
||||||
|
}
|
||||||
string sql = string.Format(temp, columnName, tableName);
|
string sql = string.Format(temp, columnName, tableName);
|
||||||
this.Context.Ado.ExecuteCommand(sql);
|
this.Context.Ado.ExecuteCommand(sql);
|
||||||
return true;
|
return true;
|
||||||
@ -377,6 +381,10 @@ namespace SqlSugar
|
|||||||
var schema = tableName.Split('.').First();
|
var schema = tableName.Split('.').First();
|
||||||
tableName = tableName.Split('.').Last();
|
tableName = tableName.Split('.').Last();
|
||||||
var temp = this.AddColumnRemarkSql.Replace("N'dbo'", $"N'{schema}'");
|
var temp = this.AddColumnRemarkSql.Replace("N'dbo'", $"N'{schema}'");
|
||||||
|
if (!schema.EqualCase("dbo"))
|
||||||
|
{
|
||||||
|
temp= temp.Replace("N'user'", $"N'schema'");
|
||||||
|
}
|
||||||
string sql = string.Format(temp, columnName, tableName, description);
|
string sql = string.Format(temp, columnName, tableName, description);
|
||||||
this.Context.Ado.ExecuteCommand(sql);
|
this.Context.Ado.ExecuteCommand(sql);
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user