mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2024-11-20 02:28:31 +01:00
fa51180dfa
* Remove OpenIddict * Add API Key system * Revert removing OpenIddict * fix rebase * fix tests * pr changes * fix tests * fix apikey test * pr change * fix db * add migration attrs * fix migration error * PR Changes * Fix sqlite migration * change api key to use Authorization Header * add supportAddForeignKey * use tempdata status message * fix add api key css * remove redirect url + app identifier feature :(
32 lines
1.3 KiB
C#
32 lines
1.3 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
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";
|
|
}
|
|
}
|
|
}
|