update remaining code for versioned config

This commit is contained in:
Josh Harvey 2016-12-09 11:36:29 +02:00
parent 2c6177bff9
commit e6cd0d9473
6 changed files with 25 additions and 20 deletions

View file

@ -3,6 +3,7 @@ var db = require('./db')
exports.up = function (next) {
var sql = [
'alter table devices add column user_config_id int',
'alter table user_config add column created timestamptz NOT NULL default now()',
`ALTER TABLE devices ADD CONSTRAINT user_config_id
FOREIGN KEY (user_config_id)
REFERENCES user_config (id)`