1
0
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:
Fredrik Strand Oseberg 2021-05-04 21:42:58 +02:00 committed by GitHub
parent 5091f287f2
commit 48cad24bc7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View 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,
);
};