fix: fkeys on device_id
This commit is contained in:
parent
741eac9484
commit
2b2738c204
3 changed files with 15 additions and 1 deletions
12
migrations/1724242113482-drop-last-used-fkey.js
Normal file
12
migrations/1724242113482-drop-last-used-fkey.js
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
const db = require('./db')
|
||||
|
||||
exports.up = function (next) {
|
||||
db.multi([
|
||||
'ALTER TABLE customers DROP CONSTRAINT customers_last_used_machine_fkey;',
|
||||
'ALTER TABLE machine_diagnostics DROP CONSTRAINT machine_diagnostics_device_id_fkey;'
|
||||
], next)
|
||||
}
|
||||
|
||||
exports.down = function (next) {
|
||||
next()
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue