Made CreateIndexBuilder set IndexType in Clustered(), NonClustered() and Unique().

This commit is contained in:
Lars-Erik Aabech
2013-11-14 10:55:35 +01:00
parent 69f805ecca
commit e3cd85a6a2

View File

@@ -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;
}