added better db migration support than what Subsonic provides out of the box.

This commit is contained in:
kay.one 2011-05-23 17:34:57 -07:00
commit ce63f05512
91 changed files with 7218 additions and 48 deletions

View file

@ -0,0 +1,24 @@
using Migrator.Framework;
namespace Migrator.Providers
{
public class ForeignKeyConstraintMapper
{
public string SqlForConstraint(ForeignKeyConstraint constraint)
{
switch(constraint)
{
case ForeignKeyConstraint.Cascade:
return "CASCADE";
case ForeignKeyConstraint.Restrict:
return "RESTRICT";
case ForeignKeyConstraint.SetDefault:
return "SET DEFAULT";
case ForeignKeyConstraint.SetNull:
return "SET NULL";
default:
return "NO ACTION";
}
}
}
}