mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-31 00:16:47 +01:00
fix: project client metrics trends remove invalid insert (#6385)
This commit is contained in:
parent
8f30904905
commit
5a80d5e026
@ -12,21 +12,6 @@ exports.up = function (db, cb) {
|
||||
total_environments integer NOT NULL,
|
||||
PRIMARY KEY (project, date)
|
||||
);
|
||||
|
||||
INSERT INTO project_client_metrics_trends (project, date, total_yes, total_no, total_apps, total_flags, total_environments)
|
||||
SELECT
|
||||
f.project,
|
||||
cmed.date,
|
||||
SUM(cmed.yes) AS total_yes,
|
||||
SUM(cmed.no) AS total_no,
|
||||
COUNT(DISTINCT cmed.app_name) AS total_apps,
|
||||
COUNT(DISTINCT cmed.feature_name) AS total_flags,
|
||||
COUNT(DISTINCT cmed.environment) AS total_environments
|
||||
FROM
|
||||
client_metrics_env_daily cmed
|
||||
JOIN features f on f.name = cmed.feature_name
|
||||
GROUP BY
|
||||
f.project, cmed.date
|
||||
`,
|
||||
cb,
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user