lamassu-server/migrations/1509091634946-support_logs.js
Rafael Taranto 06f8c57608 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
2018-11-18 10:15:22 +01:00

17 lines
366 B
JavaScript

var db = require('./db')
exports.up = function (next) {
const sql =
[`create table support_logs (
id uuid PRIMARY KEY,
device_id text,
timestamp timestamptz not null default now() )`,
'alter table logs add column server_timestamp timestamptz not null default now() '
]
db.multi(sql, next)
}
exports.down = function (next) {
next()
}