Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: project client metrics trends remove invalid insert #6385

Merged
merged 1 commit into from
Feb 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading