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
|
|
@ -4,7 +4,7 @@ exports.up = function (next) {
|
|||
var sql = [
|
||||
'drop table if exists devices',
|
||||
'drop table if exists paired_devices',
|
||||
`create table if not exists devices (
|
||||
`create table devices (
|
||||
device_id text PRIMARY KEY,
|
||||
name text NOT NULL,
|
||||
cashbox integer NOT NULL default 0,
|
||||
|
|
@ -14,7 +14,7 @@ exports.up = function (next) {
|
|||
display boolean NOT NULL default TRUE,
|
||||
created timestamptz NOT NULL default now()
|
||||
)`,
|
||||
db.addColumn('pairing_tokens', 'name', 'text NOT NULL')
|
||||
'alter table pairing_tokens add column name text NOT NULL'
|
||||
]
|
||||
db.multi(sql, next)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue