mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-25 00:07:47 +01:00
feat: add migration (#832)
This commit is contained in:
parent
5091f287f2
commit
48cad24bc7
23
src/migrations/20210504101429-deprecate-strategies.js
Normal file
23
src/migrations/20210504101429-deprecate-strategies.js
Normal file
@ -0,0 +1,23 @@
|
||||
exports.up = function(db, cb) {
|
||||
db.runSql(
|
||||
`
|
||||
UPDATE strategies
|
||||
SET deprecated = true, built_in = 0
|
||||
WHERE name = 'gradualRolloutSessionId' OR name = 'gradualRolloutUserId'
|
||||
OR name = 'gradualRolloutRandom'
|
||||
`,
|
||||
cb,
|
||||
);
|
||||
};
|
||||
|
||||
exports.down = function(db, cb) {
|
||||
db.runSql(
|
||||
`
|
||||
UPDATE strategies
|
||||
SET deprecated = false, built_in = 1
|
||||
WHERE name = 'gradualRolloutSessionId' OR name = 'gradualRolloutUserId'
|
||||
OR name = 'gradualRolloutRandom'
|
||||
`,
|
||||
cb,
|
||||
);
|
||||
};
|
Loading…
Reference in New Issue
Block a user