Skip to content

armgit / umami

Public Imported from GitHub
0

Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.

convert report type before data migratino

Francis Cao1825524e95af
diff --git a/prisma/migrations/14_add_link_and_pixel/migration.sql b/prisma/migrations/14_add_link_and_pixel/migration.sql
index 4e51bdb14..14feaa66a 100644
--- a/prisma/migrations/14_add_link_and_pixel/migration.sql
+++ b/prisma/migrations/14_add_link_and_pixel/migration.sql
@@ -73,9 +73,8 @@ CREATE INDEX "pixel_team_id_idx" ON "pixel"("team_id");
CREATE INDEX "pixel_created_at_idx" ON "pixel"("created_at");
-- DataMigration
-UPDATE "report"
-SET parameters = parameters - 'websiteId' - 'dateRange'
-WHERE type = 'funnel';
+UPDATE "report" SET parameters = parameters - 'websiteId' - 'dateRange' WHERE type = 'funnel';
+UPDATE "report" SET type = 'goal' WHERE type = 'goals';
INSERT INTO "report" (report_id, user_id, website_id, type, name, description, parameters, created_at, updated_at)
SELECT gen_random_uuid(),