mirror of
https://github.com/umami-software/umami.git
synced 2026-02-11 08:07:12 +01:00
Update report migration.
This commit is contained in:
parent
e8dda3952c
commit
bc37f5124e
1 changed files with 29 additions and 0 deletions
29
db/postgresql/migrations/02_report_schema/migration.sql
Normal file
29
db/postgresql/migrations/02_report_schema/migration.sql
Normal file
|
|
@ -0,0 +1,29 @@
|
||||||
|
-- CreateTable
|
||||||
|
CREATE TABLE "report" (
|
||||||
|
"report_id" UUID NOT NULL,
|
||||||
|
"user_id" UUID NOT NULL,
|
||||||
|
"website_id" UUID NOT NULL,
|
||||||
|
"type" VARCHAR(200) NOT NULL,
|
||||||
|
"name" VARCHAR(200) NOT NULL,
|
||||||
|
"description" VARCHAR(500) NOT NULL,
|
||||||
|
"parameters" VARCHAR(6000) NOT NULL,
|
||||||
|
"created_at" TIMESTAMPTZ(6) DEFAULT CURRENT_TIMESTAMP,
|
||||||
|
"updated_at" TIMESTAMPTZ(6),
|
||||||
|
|
||||||
|
CONSTRAINT "report_pkey" PRIMARY KEY ("report_id")
|
||||||
|
);
|
||||||
|
|
||||||
|
-- CreateIndex
|
||||||
|
CREATE UNIQUE INDEX "report_report_id_key" ON "report"("report_id");
|
||||||
|
|
||||||
|
-- CreateIndex
|
||||||
|
CREATE INDEX "report_user_id_idx" ON "report"("user_id");
|
||||||
|
|
||||||
|
-- CreateIndex
|
||||||
|
CREATE INDEX "report_website_id_idx" ON "report"("website_id");
|
||||||
|
|
||||||
|
-- CreateIndex
|
||||||
|
CREATE INDEX "report_type_idx" ON "report"("type");
|
||||||
|
|
||||||
|
-- CreateIndex
|
||||||
|
CREATE INDEX "report_name_idx" ON "report"("name");
|
||||||
Loading…
Add table
Add a link
Reference in a new issue