mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-25 00:07:47 +01:00
chore: remove enum type from db (#5254)
Changes the change_request_schedule `status` column to text. Drops the custom type --------- Signed-off-by: andreas-unleash <andreas@getunleash.ai>
This commit is contained in:
parent
ba9a217e8f
commit
95245c4413
@ -0,0 +1,22 @@
|
||||
'use strict';
|
||||
|
||||
exports.up = function (db, cb) {
|
||||
db.runSql(`
|
||||
ALTER TABLE change_request_schedule
|
||||
ALTER COLUMN status TYPE text USING status::text;
|
||||
|
||||
COMMIT;
|
||||
|
||||
DROP TYPE IF EXISTS change_request_schedule_status CASCADE
|
||||
`, cb);
|
||||
};
|
||||
|
||||
exports.down = function (db, cb) {
|
||||
db.runSql(`
|
||||
CREATE TYPE change_request_schedule_status AS ENUM ('pending', 'failed');
|
||||
|
||||
ALTER TABLE change_request_schedule
|
||||
ALTER COLUMN status TYPE change_request_schedule_status USING status::change_request_schedule_status;
|
||||
|
||||
`, cb);
|
||||
};
|
Loading…
Reference in New Issue
Block a user