lamassu-server/migrations/033-add_cash_in_fee.js
Fabio Cigliano 12c834469c Migration sql changes (#199)
* safe migration script changes

* lamassu migration script fixes
2018-11-01 13:26:48 +02:00

17 lines
568 B
JavaScript

var db = require('./db')
exports.up = function (next) {
var sql = [
db.addColumn('cash_in_txs', 'cash_in_fee', 'numeric(14, 5) not null'),
db.addColumn('cash_in_txs', 'cash_in_fee_crypto', 'bigint not null'),
db.addColumn('cash_in_txs', 'minimum_tx', 'integer not null'),
db.addColumn('bills', 'cash_in_fee', 'numeric(14, 5) not null'),
db.addColumn('bills', 'cash_in_fee_crypto', 'bigint not null'),
db.addColumn('bills', 'crypto_atoms_after_fee', 'bigint not null')
]
db.multi(sql, next)
}
exports.down = function (next) {
next()
}