SqlServer RenameColumn bug

This commit is contained in:
610262374@qq.com
2018-12-17 16:51:09 +08:00
parent 9f9b307049
commit 5ec37a5c81

View File

@@ -280,5 +280,15 @@ namespace SqlSugar
}
return true;
}
public override bool RenameColumn(string tableName, string oldColumnName, string newColumnName)
{
tableName = this.SqlBuilder.GetTranslationTableName(tableName);
oldColumnName = this.SqlBuilder.GetTranslationColumnName(oldColumnName);
newColumnName = this.SqlBuilder.GetNoTranslationColumnName(newColumnName);
string sql = string.Format(this.RenameColumnSql, tableName, oldColumnName, newColumnName);
this.Context.Ado.ExecuteCommand(sql);
return true;
}
}
}