From 71e8209a83c139c7dd2096a287774436daa3d76d Mon Sep 17 00:00:00 2001 From: Ran Guin Date: Mon, 26 Jul 2021 19:21:11 -0700 Subject: add accounts.contract, user.subscriptions --- db/normalized/accounts.js | 5 ++++- db/normalized/user_preferences.js | 6 ++++-- 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'db/normalized') diff --git a/db/normalized/accounts.js b/db/normalized/accounts.js index d09f2dcf..6136d0a0 100644 --- a/db/normalized/accounts.js +++ b/db/normalized/accounts.js @@ -11,7 +11,10 @@ exports.up = function(knex) { t.enu('network', ['Bitcoin', 'Liquid', 'Lightning', 'CoinOS']).notNull(); - // t.string('contract'); + t.longtext('contract').collate('utf8mb4').nullable(); // custodial ? + + // knex.raw("ALTER TABLE accounts MODIFY `contract` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL") + // t.string('hide'); // t.string('index'); diff --git a/db/normalized/user_preferences.js b/db/normalized/user_preferences.js index fafe5f1a..36956dc0 100644 --- a/db/normalized/user_preferences.js +++ b/db/normalized/user_preferences.js @@ -8,11 +8,13 @@ exports.up = function(knex) { t.enum('default_currency', ['CAD', 'USD']).notNull().defaultTo('CAD'); t.enum('default_fiat', ['CAD', 'USD']).notNull().defaultTo('CAD'); t.set('show_currencies', ['CAD', 'USD']).notNull().defaultTo('CAD'); - + t.longtext(`subscriptions`).collate('utf8mb4').nullable(); // CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL") t.timestamps(); + + // knex.raw("ALTER TABLE users MODIFY `subscriptions` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL") }) } exports.down = function(knex) { return knex.schema.dropTable('user_preferences'); -}; \ No newline at end of file +}; -- cgit v1.2.3