Updating expressions to output sql for use with the fluent migrations, so it can be used for db upgrades.

This commit is contained in:
Morten Christensen
2012-12-20 11:36:20 -01:00
parent 9d55fed6e7
commit c1695c2f7f
24 changed files with 287 additions and 90 deletions

View File

@@ -1,4 +1,5 @@
using System.Linq;
using System;
using System.Linq;
using Umbraco.Core.Persistence.DatabaseAnnotations;
using Umbraco.Core.Persistence.DatabaseModelDefinitions;
@@ -142,10 +143,20 @@ namespace Umbraco.Core.Persistence.SqlSyntax
return null;
}
public override string DeleteDefaultConstraint
{
get
{
throw new NotSupportedException("Default constraints are not supported in MySql");
}
}
public override string AlterColumn { get { return "ALTER TABLE {0} MODIFY COLUMN {1}"; } }
public override string DeleteConstraint { get { return "ALTER TABLE {0} DROP {1}{2}"; } }
public override string DropIndex { get { return "DROP INDEX {0} ON {1}"; } }
public override string CreateTable { get { return "CREATE TABLE {0} ({1}) ENGINE = INNODB"; } }
public override string CreateIndex { get { return "CREATE INDEX {0} ON {1} ({2})"; } }