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.

Added indexes. Removed old migration.

Mike Cao0724201f695d
diff --git a/db/postgresql/migrations/02_report_schema/migration.sql b/db/postgresql/migrations/02_report_schema/migration.sql
deleted file mode 100644
index 8b2bf0f5e..000000000
--- a/db/postgresql/migrations/02_report_schema/migration.sql
+++ /dev/null
@@ -1,19 +0,0 @@
--- CreateTable
-CREATE TABLE "user_report" (
- "report_id" UUID NOT NULL,
- "user_id" UUID NOT NULL,
- "website_id" UUID NOT NULL,
- "report_name" VARCHAR(200) NOT NULL,
- "template_name" VARCHAR(200) NOT NULL,
- "parameters" VARCHAR(6000) NOT NULL,
- "created_at" TIMESTAMPTZ(6) DEFAULT CURRENT_TIMESTAMP,
- "updated_at" TIMESTAMPTZ(6),
-
- CONSTRAINT "user_report_pkey" PRIMARY KEY ("report_id")
-);
-
--- CreateIndex
-CREATE UNIQUE INDEX "user_report_report_id_key" ON "user_report"("report_id");
-
--- CreateIndex
-CREATE INDEX "user_report_user_id_idx" ON "user_report"("user_id");
diff --git a/db/postgresql/schema.prisma b/db/postgresql/schema.prisma
index 318d455dc..7c4cb94f9 100644
--- a/db/postgresql/schema.prisma
+++ b/db/postgresql/schema.prisma
@@ -173,5 +173,7 @@ model Report {
@@index([userId])
@@index([websiteId])
+ @@index([type])
+ @@index([name])
@@map("report")
}