lamassu-server/migrations/1526038623129-add_device_location.js
2018-05-21 16:30:13 +03:00

13 lines
302 B
JavaScript

var db = require('./db')
exports.up = function (next) {
var sql = [
'alter table devices add column last_online timestamptz not null default now()',
"alter table devices add column location json not null default '{}'"
]
db.multi(sql, next)
}
exports.down = function (next) {
next()
}