fix up crypto services
This commit is contained in:
parent
e24da06a1b
commit
1b89ed5c76
9 changed files with 82 additions and 46 deletions
15
migrations/021-config-version-id.js
Normal file
15
migrations/021-config-version-id.js
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
var db = require('./db')
|
||||
|
||||
exports.up = function (next) {
|
||||
var sql = [
|
||||
'alter table devices add column user_config_id int',
|
||||
`ALTER TABLE devices ADD CONSTRAINT user_config_id
|
||||
FOREIGN KEY (user_config_id)
|
||||
REFERENCES user_config (id)`
|
||||
]
|
||||
db.multi(sql, next)
|
||||
}
|
||||
|
||||
exports.down = function (next) {
|
||||
next()
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue