1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-02-09 00:18:00 +01:00

feat: migration for health and time_to_production in flag trends (#6067)

This commit is contained in:
Mateusz Kwasniewski 2024-01-30 13:28:10 +01:00 committed by GitHub
parent 38df2e1831
commit 82e84ec14d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -0,0 +1,18 @@
'use strict';
exports.up = function(db, cb) {
db.runSql(
`
ALTER TABLE flag_trends ADD COLUMN IF NOT EXISTS health INTEGER DEFAULT 100;
ALTER TABLE flag_trends ADD COLUMN IF NOT EXISTS time_to_production FLOAT DEFAULT 0;
`,
cb,
);
};
exports.down = function(db, cb) {
db.runSql(`
ALTER TABLE flag_trends DROP COLUMN IF EXISTS health;
ALTER TABLE flag_trends DROP COLUMN IF EXISTS time_to_production;
`, cb);
};