mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-12-14 11:23:42 +02:00
25 lines
584 B
C#
25 lines
584 B
C#
|
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";
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|