mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-19 21:13:28 -07:00
added better db migration support than what Subsonic provides out of the box.
This commit is contained in:
parent
180da4c82a
commit
ce63f05512
91 changed files with 7218 additions and 48 deletions
|
@ -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";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue