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

Feat: add metrics summary columns to flag trends (#6440)

Adds the metrics summary trend columns to flag_trends table.
These will be populated with the rest of the weekly aggregations

Closes
[1-2139](https://linear.app/unleash/issue/1-2139/add-the-summary-columns-to-flag-trends-table)

---------

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
This commit is contained in:
andreas-unleash 2024-03-05 16:49:17 +02:00 committed by GitHub
parent e8e1d6e9f0
commit 1915b77b9b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -0,0 +1,25 @@
'use strict';
exports.up = function(db, cb) {
db.runSql(
`
ALTER TABLE IF EXISTS flag_trends
ADD COLUMN total_yes integer,
ADD COLUMN total_no integer,
ADD COLUMN total_apps integer,
ADD COLUMN total_environments integer;
`,
cb,
);
};
exports.down = function(db, cb) {
db.runSql(`ALTER TABLE IF EXISTS flag_trends
DROP COLUMN IF EXISTS total_no,
DROP COLUMN IF EXISTS total_apps,
DROP COLUMN IF EXISTS total_environments,
DROP COLUMN IF EXISTS total_yes;`
,
cb
);
};