mirror of
https://github.com/Unleash/unleash.git
synced 2025-04-15 01:16:22 +02: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:
parent
6cede446e5
commit
62361847f5
18
src/migrations/20240304160659-add-environment-type-trends.js
Normal file
18
src/migrations/20240304160659-add-environment-type-trends.js
Normal 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);
|
||||||
|
};
|
Loading…
Reference in New Issue
Block a user