Skip to content

Commit

Permalink
fix: project client metrics trends remove invalid insert
Browse files Browse the repository at this point in the history
  • Loading branch information
kwasniew committed Feb 29, 2024
1 parent 80d89ab commit bdc3a36
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions src/migrations/20240222123532-project-metrics-summary-trends.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
);
Expand Down

0 comments on commit bdc3a36

Please sign in to comment.