simplifies tablename for dictionary dto

This commit is contained in:
LiamL
2020-01-22 13:22:09 +00:00
parent 93e85f77f2
commit 1047929880

View File

@@ -15,16 +15,14 @@ namespace Umbraco.Core.Migrations.Upgrade.V_8_6_0
/// if it doesn't already exist
/// </summary>
public override void Migrate()
{
var tableInfo = Context.Database.PocoDataFactory.ForType(typeof(DictionaryDto)).TableInfo;
tableInfo.TableName = tableInfo.TableName;
var indexName = "IX_" + tableInfo.TableName + "_Parent";
{
var indexName = "IX_" + DictionaryDto.TableName + "_Parent";
if (IndexExists(indexName) == false)
{
Create
.Index(indexName)
.OnTable(tableInfo.TableName)
.OnTable(DictionaryDto.TableName)
.OnColumn("parent")
.Ascending()
.WithOptions().NonClustered()