mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-22 19:07:54 +01:00
23 lines
504 B
JavaScript
23 lines
504 B
JavaScript
|
'use strict';
|
||
|
|
||
|
exports.up = function (db, cb) {
|
||
|
// mark existing events as announced, set the default to false for future events.
|
||
|
db.runSql(
|
||
|
`
|
||
|
ALTER TABLE events
|
||
|
ADD COLUMN IF NOT EXISTS "announced" BOOLEAN DEFAULT TRUE,
|
||
|
ALTER COLUMN "announced" SET DEFAULT FALSE;
|
||
|
`,
|
||
|
cb(),
|
||
|
);
|
||
|
};
|
||
|
|
||
|
exports.down = function (db, cb) {
|
||
|
db.runSql(
|
||
|
`
|
||
|
ALTER TABLE events DROP COLUMN IF EXISTS "announced";
|
||
|
`,
|
||
|
cb,
|
||
|
);
|
||
|
};
|