Made CreateIndexBuilder set IndexType in Clustered(), NonClustered() and Unique().
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Umbraco.Core.Persistence.DatabaseModelDefinitions;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
using Umbraco.Core.Persistence.DatabaseModelDefinitions;
|
||||
using Umbraco.Core.Persistence.Migrations.Syntax.Expressions;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Migrations.Syntax.Create.Index
|
||||
@@ -53,18 +54,21 @@ namespace Umbraco.Core.Persistence.Migrations.Syntax.Create.Index
|
||||
|
||||
public ICreateIndexOnColumnSyntax NonClustered()
|
||||
{
|
||||
Expression.Index.IndexType = IndexTypes.NonClustered;
|
||||
Expression.Index.IsClustered = false;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ICreateIndexOnColumnSyntax Clustered()
|
||||
{
|
||||
Expression.Index.IndexType = IndexTypes.Clustered;
|
||||
Expression.Index.IsClustered = true;
|
||||
return this;
|
||||
}
|
||||
|
||||
ICreateIndexOnColumnSyntax ICreateIndexOptionsSyntax.Unique()
|
||||
{
|
||||
Expression.Index.IndexType = IndexTypes.UniqueNonClustered;
|
||||
Expression.Index.IsUnique = true;
|
||||
return this;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user