mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-18 22:44:29 +01:00
Change some table type from TEXT to JSONB (#4371)
* Change some table type from TEXT to JSONB * Deprecate mysql and sqlite backend
This commit is contained in:
@@ -47,7 +47,7 @@ namespace BTCPayServer.Data
|
||||
|
||||
public static StoreBlob GetStoreBlob(this StoreData storeData)
|
||||
{
|
||||
var result = storeData.StoreBlob == null ? new StoreBlob() : new Serializer(null).ToObject<StoreBlob>(Encoding.UTF8.GetString(storeData.StoreBlob));
|
||||
var result = storeData.StoreBlob == null ? new StoreBlob() : new Serializer(null).ToObject<StoreBlob>(storeData.StoreBlob);
|
||||
if (result.PreferredExchange == null)
|
||||
result.PreferredExchange = CoinGeckoRateProvider.CoinGeckoName;
|
||||
if (result.PaymentMethodCriteria is null)
|
||||
@@ -62,7 +62,7 @@ namespace BTCPayServer.Data
|
||||
var newBlob = new Serializer(null).ToString(storeBlob);
|
||||
if (original == newBlob)
|
||||
return false;
|
||||
storeData.StoreBlob = Encoding.UTF8.GetBytes(newBlob);
|
||||
storeData.StoreBlob = newBlob;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user