Fixing foreignkey issues
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Umbraco.Core.Persistence.Migrations.Model;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
using Umbraco.Core.Persistence.Migrations.Model;
|
||||
using ColumnDefinition = Umbraco.Core.Persistence.SqlSyntax.ModelDefinitions.ColumnDefinition;
|
||||
|
||||
namespace Umbraco.Core.Persistence.SqlSyntax
|
||||
@@ -35,6 +36,23 @@ namespace Umbraco.Core.Persistence.SqlSyntax
|
||||
InitColumnTypeMap();
|
||||
}
|
||||
|
||||
public override string GetIndexType(IndexTypes indexTypes)
|
||||
{
|
||||
string indexType;
|
||||
//NOTE Sql Ce doesn't support clustered indexes
|
||||
if (indexTypes == IndexTypes.Clustered)
|
||||
{
|
||||
indexType = "NONCLUSTERED";
|
||||
}
|
||||
else
|
||||
{
|
||||
indexType = indexTypes == IndexTypes.NonClustered
|
||||
? "NONCLUSTERED"
|
||||
: "UNIQUE NONCLUSTERED";
|
||||
}
|
||||
return indexType;
|
||||
}
|
||||
|
||||
public override string GetQuotedTableName(string tableName)
|
||||
{
|
||||
return string.Format("[{0}]", tableName);
|
||||
|
||||
Reference in New Issue
Block a user