Migration sql changes (#199)

* safe migration script changes

* lamassu migration script fixes
This commit is contained in:
Fabio Cigliano 2018-11-02 00:26:48 +13:00 committed by Josh Harvey
parent 65ce8aee3d
commit 12c834469c
53 changed files with 500 additions and 346 deletions

View file

@ -2,13 +2,13 @@ var db = require('./db')
exports.up = function (next) {
var sql = [
'alter table cash_in_txs alter column cash_in_fee_crypto type numeric(30)',
'alter table cash_in_txs alter column crypto_atoms type numeric(30)',
'alter table cash_out_txs alter column crypto_atoms type numeric(30)',
'alter table trades alter column crypto_atoms type numeric(30)',
'alter table bills alter column crypto_atoms type numeric(30)',
'alter table bills alter column cash_in_fee_crypto type numeric(30)',
'alter table bills alter column crypto_atoms_after_fee type numeric(30)'
db.alterColumn('cash_in_txs', 'cash_in_fee_crypto', 'type numeric(30)'),
db.alterColumn('cash_in_txs', 'crypto_atoms', 'type numeric(30)'),
db.alterColumn('cash_out_txs', 'crypto_atoms', 'type numeric(30)'),
db.alterColumn('trades', 'crypto_atoms', 'type numeric(30)'),
db.alterColumn('bills', 'crypto_atoms', 'type numeric(30)'),
db.alterColumn('bills', 'cash_in_fee_crypto', 'type numeric(30)'),
db.alterColumn('bills', 'crypto_atoms_after_fee', 'type numeric(30)')
]
db.multi(sql, next)
}