2019-08-29 17:24:42 +02:00
|
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
|
|
|
|
|
|
namespace BTCPayServer.Migrations
|
|
|
|
{
|
|
|
|
public static class MigrationsExtensions
|
|
|
|
{
|
|
|
|
public static bool SupportDropColumn(this Microsoft.EntityFrameworkCore.Migrations.Migration migration, string activeProvider)
|
|
|
|
{
|
|
|
|
return activeProvider != "Microsoft.EntityFrameworkCore.Sqlite";
|
|
|
|
}
|
2020-02-24 14:36:15 +01:00
|
|
|
public static bool SupportAddForeignKey(this Microsoft.EntityFrameworkCore.Migrations.Migration migration, string activeProvider)
|
|
|
|
{
|
|
|
|
return activeProvider != "Microsoft.EntityFrameworkCore.Sqlite";
|
|
|
|
}
|
2019-08-29 17:24:42 +02:00
|
|
|
public static bool SupportDropForeignKey(this Microsoft.EntityFrameworkCore.Migrations.Migration migration, string activeProvider)
|
|
|
|
{
|
|
|
|
return activeProvider != "Microsoft.EntityFrameworkCore.Sqlite";
|
|
|
|
}
|
|
|
|
public static bool SupportDropForeignKey(this DatabaseFacade facade)
|
|
|
|
{
|
|
|
|
return facade.ProviderName != "Microsoft.EntityFrameworkCore.Sqlite";
|
|
|
|
}
|
2019-12-23 06:56:21 +01:00
|
|
|
public static bool IsMySql(this Microsoft.EntityFrameworkCore.Migrations.Migration migration, string activeProvider)
|
|
|
|
{
|
|
|
|
return activeProvider == "Pomelo.EntityFrameworkCore.MySql";
|
|
|
|
}
|
2019-08-29 17:24:42 +02:00
|
|
|
}
|
|
|
|
}
|