1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-10-28 19:06:12 +01:00

Feat: add enviroment type trends table (#6432)

Creates the environment_type_trends table to store aggregated metrics

Closes: #
[1-2124](https://linear.app/unleash/issue/1-2124/create-the-table-to-store-weekly-aggregation)

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
This commit is contained in:
andreas-unleash 2024-03-05 10:51:32 +02:00 committed by GitHub
parent 6cede446e5
commit 62361847f5
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(
`
CREATE TABLE IF NOT EXISTS environment_type_trends (
id VARCHAR(255) NOT NULL,
environment_type VARCHAR(255) NOT NULL,
total_updates INTEGER NOT NULL,
PRIMARY KEY (id, environment_type)
);`,
cb,
);
};
exports.down = function(db, cb) {
db.runSql('DROP TABLE IF EXISTS environment_type_trends;', cb);
};