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.

add data conversion to report param migration

Francis Caoa9c79388873d
diff --git a/db/postgresql/migrations/12_update_report_parameter/migration.sql b/db/postgresql/migrations/12_update_report_parameter/migration.sql
index f063973a4..aca2f39d8 100644
--- a/db/postgresql/migrations/12_update_report_parameter/migration.sql
+++ b/db/postgresql/migrations/12_update_report_parameter/migration.sql
@@ -1,3 +1,7 @@
+-- ConvertData
+UPDATE "report"
+SET "parameters" = CONCAT('"', REPLACE(parameters, '"', '\"'), '"');
+
-- AlterTable
ALTER TABLE "report"
-ALTER COLUMN "parameters" SET DATA TYPE JSONB USING parameters::JSONB
+ALTER COLUMN "parameters" SET DATA TYPE JSONB USING parameters::JSONB;