lamassu-server/migrations/1509091634946-support_logs.js
Fabio Cigliano 12c834469c Migration sql changes (#199)
* safe migration script changes

* lamassu migration script fixes
2018-11-01 13:26:48 +02:00

17 lines
376 B
JavaScript

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