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

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

13 lines
298 B
JavaScript

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