Changes index to be a combined index since that is what is required
This commit is contained in:
@@ -15,16 +15,11 @@ namespace Umbraco.Core.Migrations.Upgrade.V_8_6_0
|
||||
.OnTable(ContentVersionDto.TableName)
|
||||
.OnColumn("nodeId")
|
||||
.Ascending()
|
||||
.WithOptions().NonClustered()
|
||||
.Do();
|
||||
|
||||
Create
|
||||
.Index("IX_" + ContentVersionDto.TableName + "_Current")
|
||||
.OnTable(ContentVersionDto.TableName)
|
||||
.OnColumn("current")
|
||||
.Ascending()
|
||||
.WithOptions().NonClustered()
|
||||
.Do();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace Umbraco.Core.Persistence.Dtos
|
||||
|
||||
[Column("nodeId")]
|
||||
[ForeignKey(typeof(ContentDto))]
|
||||
[Index(IndexTypes.NonClustered, Name = "IX_" + TableName + "_NodeId")]
|
||||
[Index(IndexTypes.NonClustered, Name = "IX_" + TableName + "_NodeId", ForColumns = "nodeId,current")]
|
||||
public int NodeId { get; set; }
|
||||
|
||||
[Column("versionDate")] // TODO: db rename to 'updateDate'
|
||||
@@ -32,7 +32,6 @@ namespace Umbraco.Core.Persistence.Dtos
|
||||
public int? UserId { get => _userId == 0 ? null : _userId; set => _userId = value; } //return null if zero
|
||||
|
||||
[Column("current")]
|
||||
[Index(IndexTypes.NonClustered, Name = "IX_" + TableName + "_Current")]
|
||||
public bool Current { get; set; }
|
||||
|
||||
// about current:
|
||||
|
||||
Reference in New Issue
Block a user