1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-10-18 20:09:08 +02:00
unleash.unleash/src/migrations/20211105104316-add-feature-name-column-to-events.js

24 lines
426 B
JavaScript
Raw Normal View History

'use strict';
exports.up = function (db, cb) {
db.runSql(
`
ALTER TABLE events
ADD COLUMN feature_name TEXT;
CREATE INDEX feature_name_idx ON events(feature_name);
`,
cb,
);
};
exports.down = function (db, cb) {
db.runSql(
`
DROP INDEX feature_name_idx;
ALTER TABLE events
DROP COLUMN feature_name;
`,
cb,
);
};