Ensures not to add new indexes if they already exist

This commit is contained in:
Shannon
2014-03-12 18:37:22 +11:00
parent d0fc3ddba5
commit aee10348e5
8 changed files with 49 additions and 7 deletions

View File

@@ -233,7 +233,7 @@ namespace Umbraco.Core.Persistence.SqlSyntax
"SELECT TABLE_NAME, INDEX_NAME, COLUMN_NAME, [UNIQUE] FROM INFORMATION_SCHEMA.INDEXES ORDER BY TABLE_NAME, INDEX_NAME");
return
items.Select(
item => new Tuple<string, string, string, bool>(item.TABLE_NAME, item.INDEX_NAME, item.COLUMN_NAME, item.UNIQUE));
item => new Tuple<string, string, string, bool>(item.TABLE_NAME, item.INDEX_NAME, item.COLUMN_NAME, item.UNIQUE == 1));
}
public override bool DoesTableExist(Database db, string tableName)