mirror of
https://github.com/Unleash/unleash.git
synced 2025-02-09 00:18:00 +01:00
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>
26 lines
612 B
JavaScript
26 lines
612 B
JavaScript
'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
|
|
);
|
|
};
|