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
|
|
@ -8,12 +8,12 @@ exports.up = function (next) {
|
|||
.map(singleQuotify).join(',')
|
||||
|
||||
var sql = [
|
||||
db.defineEnum('status_stage', statuses),
|
||||
db.addColumn('transactions', 'dispensed', 'boolean NOT NULL DEFAULT false'),
|
||||
db.addColumn('transactions', 'notified', 'boolean NOT NULL DEFAULT false'),
|
||||
db.addColumn('transactions', 'redeem', 'boolean NOT NULL DEFAULT false'),
|
||||
db.addColumn('transactions', 'confirmation_time', 'timestamptz'),
|
||||
db.addColumn('transactions', 'status', 'status_stage NOT NULL DEFAULT \'notSeen\'')
|
||||
'create type status_stage AS enum (' + statuses + ')',
|
||||
'alter table transactions add dispensed boolean NOT NULL DEFAULT false',
|
||||
'alter table transactions add notified boolean NOT NULL DEFAULT false',
|
||||
'alter table transactions add redeem boolean NOT NULL DEFAULT false',
|
||||
'alter table transactions add confirmation_time timestamptz',
|
||||
'alter table transactions add status status_stage NOT NULL DEFAULT \'notSeen\''
|
||||
]
|
||||
db.multi(sql, next)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue