mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2024-11-19 09:54:30 +01:00
29 lines
1.2 KiB
C#
29 lines
1.2 KiB
C#
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";
|
|
}
|
|
public static bool SupportAddForeignKey(this Microsoft.EntityFrameworkCore.Migrations.Migration migration, string activeProvider)
|
|
{
|
|
return activeProvider != "Microsoft.EntityFrameworkCore.Sqlite";
|
|
}
|
|
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";
|
|
}
|
|
public static bool IsMySql(this Microsoft.EntityFrameworkCore.Migrations.Migration migration, string activeProvider)
|
|
{
|
|
return activeProvider == "Pomelo.EntityFrameworkCore.MySql";
|
|
}
|
|
}
|
|
}
|