mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2024-11-19 09:54:30 +01:00
08b239e87a
* Change some table type from TEXT to JSONB * Deprecate mysql and sqlite backend
23 lines
568 B
C#
23 lines
568 B
C#
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
|
|
namespace BTCPayServer.Data
|
|
{
|
|
public class SettingData
|
|
{
|
|
public string Id { get; set; }
|
|
|
|
public string Value { get; set; }
|
|
|
|
public static void OnModelCreating(ModelBuilder builder, DatabaseFacade databaseFacade)
|
|
{
|
|
if (databaseFacade.IsNpgsql())
|
|
{
|
|
builder.Entity<SettingData>()
|
|
.Property(o => o.Value)
|
|
.HasColumnType("JSONB");
|
|
}
|
|
}
|
|
}
|
|
}
|