1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-25 00:07:47 +01:00
unleash.unleash/src/migrations/20230803061359-change-request-optional-feature.js
2023-08-03 11:22:35 +02:00

21 lines
456 B
JavaScript

'use strict';
exports.up = function (db, callback) {
db.runSql(
`
ALTER TABLE change_request_events ALTER COLUMN feature DROP NOT NULL;
`,
callback,
);
};
exports.down = function (db, callback) {
db.runSql(
`
DELETE FROM change_request_events WHERE feature IS NULL;
ALTER TABLE change_request_events ALTER COLUMN feature SET NOT NULL;
`,
callback,
);
};