Synchronization code

This commit is contained in:
sunkaixuan
2024-04-12 17:34:56 +08:00
parent 3615b9ce13
commit 04e883f7d2
2 changed files with 8 additions and 0 deletions

View File

@@ -214,6 +214,13 @@ namespace SqlSugar
this.Context.Ado.ExecuteCommand($" DROP INDEX {indexName} ");
return true;
}
public virtual bool DropIndex(string indexName,string tableName)
{
indexName = this.SqlBuilder.GetNoTranslationColumnName(indexName);
tableName= this.SqlBuilder.GetNoTranslationColumnName(tableName);
this.Context.Ado.ExecuteCommand($" DROP INDEX {indexName} ON {tableName}");
return true;
}
public virtual bool DropView(string viewName)
{
viewName = this.SqlBuilder.GetNoTranslationColumnName(viewName);

View File

@@ -43,6 +43,7 @@ namespace SqlSugar
bool DropTable(string tableName);
bool DropView(string viewName);
bool DropIndex(string indexName);
bool DropIndex(string indexName, string tableName);
bool DropFunction(string funcName);
bool DropProc(string procName);
bool DropTable(params string[] tableName);