Fixing foreignkey issues

This commit is contained in:
Morten Christensen
2012-12-05 08:39:31 -01:00
parent e73f80d78c
commit 602e3260fa
5 changed files with 26 additions and 10 deletions

View File

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