mirror of
https://github.com/Unleash/unleash.git
synced 2025-02-23 00:22:19 +01:00
22 lines
702 B
JavaScript
22 lines
702 B
JavaScript
|
exports.up = function (db, cb) {
|
||
|
db.runSql(
|
||
|
`
|
||
|
CREATE INDEX IF NOT EXISTS idx_action_states_action_id ON action_states(action_id);
|
||
|
CREATE INDEX IF NOT EXISTS idx_action_states_observable_event_id ON action_states(observable_event_id);
|
||
|
CREATE INDEX IF NOT EXISTS idx_action_states_action_observable ON action_states(action_id, observable_event_id);
|
||
|
`,
|
||
|
cb,
|
||
|
);
|
||
|
};
|
||
|
|
||
|
exports.down = function (db, cb) {
|
||
|
db.runSql(
|
||
|
`
|
||
|
DROP INDEX IF EXISTS idx_action_states_action_id;
|
||
|
DROP INDEX IF EXISTS idx_action_states_observable_event_id;
|
||
|
DROP INDEX IF EXISTS idx_action_states_action_observable;
|
||
|
`,
|
||
|
cb,
|
||
|
);
|
||
|
};
|