diff --git a/migration/1772841480000-AddXtJusd.js b/migration/1772841480000-AddXtJusd.js new file mode 100644 index 0000000000..dd0036b7f2 --- /dev/null +++ b/migration/1772841480000-AddXtJusd.js @@ -0,0 +1,24 @@ +module.exports = class AddXtJusd1772841480000 { + name = 'AddXtJusd1772841480000' + + async up(queryRunner) { + await queryRunner.query(` + IF NOT EXISTS (SELECT 1 FROM "dbo"."asset" WHERE "uniqueName" = 'XT/JUSD') + INSERT INTO "dbo"."asset" ( + "name", "type", "buyable", "sellable", "chainId", "dexName", "category", "blockchain", "uniqueName", "description", + "comingSoon", "decimals", "paymentEnabled", "refundEnabled", "cardBuyable", "cardSellable", "instantBuyable", "instantSellable", + "financialType", "ikna", "personalIbanEnabled", "amlRuleFrom", "amlRuleTo", "priceRuleId", + "approxPriceUsd", "approxPriceChf", "approxPriceEur", "sortOrder" + ) VALUES ( + 'JUSD', 'Custody', 0, 0, NULL, 'JUSD', 'Private', 'XT', 'XT/JUSD', NULL, + 0, NULL, 0, 0, 0, 0, 0, 0, + 'USD', 0, 0, 0, 0, 40, + 1.0, 0.776106, 0.859718, NULL + ) + `); + } + + async down(queryRunner) { + await queryRunner.query(`DELETE FROM "dbo"."asset" WHERE "uniqueName" = 'XT/JUSD'`); + } +}