1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00

feat: add created_by and status columns to change_request_schedule (#5203)

Adds 2 columns to change_request_schedule

---------

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
This commit is contained in:
andreas-unleash 2023-10-30 12:01:06 +02:00 committed by GitHub
parent 54cb9b6b0e
commit 6875daf157
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -0,0 +1,26 @@
'use strict';
exports.up = function (db, cb) {
db.runSql(`
CREATE TYPE change_request_schedule_status AS ENUM ('pending', 'failed');
ALTER TABLE change_request_schedule
ADD COLUMN IF NOT EXISTS created_by integer REFERENCES users(id);
ALTER TABLE change_request_schedule
ADD COLUMN IF NOT EXISTS status change_request_schedule_status default 'pending';
`, cb);
};
exports.down = function (db, cb) {
db.runSql(`
ALTER TABLE change_request_schedule
DROP COLUMN IF EXISTS created_by;
ALTER TABLE change_request_schedule
DROP COLUMN IF EXISTS status;
DROP TYPE change_request_schedule_status
`, cb);
};