mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
added better db migration support than what Subsonic provides out of the box.
This commit is contained in:
@@ -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";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user