1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-10-18 20:09:08 +02:00
unleash.unleash/src/migrations/20210302080040-add-pk-to-client-instances.js

21 lines
378 B
JavaScript
Raw Normal View History

'use strict';
exports.up = function(db, cb) {
db.runSql(
`
ALTER TABLE client_instances ADD PRIMARY KEY (app_name, instance_id);
`,
cb,
);
};
exports.down = function(db, cb) {
db.runSql(
`
ALTER TABLE client_instances DROP CONSTRAINT client_instances_pkey;
DROP INDEX client_instance_pkey
`,
cb,
);
};