1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-28 00:06:53 +01:00

chore: add migration for release-plans-definitions that removes fk on users(id) (#8614)

This commit is contained in:
David Leek 2024-10-31 13:49:55 +01:00 committed by GitHub
parent b8a4fbd867
commit 7f5d27302e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -0,0 +1,13 @@
exports.up = function(db, cb) {
db.runSql(`
ALTER TABLE release_plan_definitions DROP CONSTRAINT release_plan_definitions_created_by_user_id_fkey;
CREATE INDEX idx_release_plan_definitions_created_by_user_id ON release_plan_definitions (created_by_user_id);
`, cb)
};
exports.down = function(db, cb) {
db.runSql(`
ALTER TABLE release_plan_definitions ADD CONSTRAINT release_plan_definitions_created_by_user_id_fkey FOREIGN KEY (created_by_user_id) REFERENCES users(id);
DROP INDEX idx_release_plan_definitions_created_by_user_id;
`, cb);
};