You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
584 B
25 lines
584 B
13 years ago
|
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";
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|