Create support_logs (db & api)

This commit is contained in:
goga-m 2017-10-27 17:36:40 +03:00 committed by Josh Harvey
parent b7d6f3f419
commit 62d606cc80
8 changed files with 279 additions and 58 deletions

View file

@ -0,0 +1,17 @@
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()
}

View file

@ -0,0 +1,12 @@
const db = require('./db')
exports.up = function (next) {
const sql = [
'alter table devices add column name text not null'
]
db.multi(sql, next)
}
exports.down = function (next) {
next()
}