Save migrations file on db (#215)
* Revert "Migration sql changes (#199)"
This reverts commit 12c834469c.
* Save migrate file on db
* Add message on migration error in lamassu-update
This commit is contained in:
parent
9af204e609
commit
06f8c57608
58 changed files with 1516 additions and 567 deletions
|
|
@ -2,13 +2,13 @@ var db = require('./db')
|
|||
|
||||
exports.up = function (next) {
|
||||
var sql = [
|
||||
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)')
|
||||
'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.multi(sql, next)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue