From 038a22aba72edf835eeed2ab8efd7ddf582d1e12 Mon Sep 17 00:00:00 2001 From: Fabio Cigliano Date: Fri, 23 Nov 2018 11:42:17 +1300 Subject: [PATCH] migration added --- migrations/1542926067866-tx-commission.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 migrations/1542926067866-tx-commission.js diff --git a/migrations/1542926067866-tx-commission.js b/migrations/1542926067866-tx-commission.js new file mode 100644 index 00000000..f8dbb3fd --- /dev/null +++ b/migrations/1542926067866-tx-commission.js @@ -0,0 +1,16 @@ +'use strict' + +const db = require('./db') + +exports.up = function (next) { + var sql = [ + 'ALTER TABLE cash_in_txs ADD COLUMN commission_percentage numeric(14, 5) null DEFAULT null', + 'ALTER TABLE cash_out_txs ADD COLUMN commission_percentage numeric(14, 5) null DEFAULT null' + ] + + db.multi(sql, next) +} + +exports.down = function (next) { + next() +}