mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-28 00:06:53 +01:00
18 lines
473 B
JavaScript
18 lines
473 B
JavaScript
|
'use strict';
|
||
|
|
||
|
exports.up = function (db, callback) {
|
||
|
db.runSql(
|
||
|
`
|
||
|
UPDATE events set announced = false where announced IS NULL;
|
||
|
ALTER TABLE events ALTER COLUMN announced SET NOT NULL;
|
||
|
ALTER TABLE events ALTER COLUMN announced SET DEFAULT false;
|
||
|
CREATE INDEX events_unannounced_idx ON events(announced) WHERE announced = false;
|
||
|
`,
|
||
|
callback(),
|
||
|
);
|
||
|
};
|
||
|
|
||
|
exports.down = function (db, callback) {
|
||
|
callback();
|
||
|
};
|