add segment and report param migrations

This commit is contained in:
Francis Cao 2025-06-04 09:27:28 -07:00
parent 42be91b736
commit 76519e0d14
3 changed files with 45 additions and 10 deletions

View file

@ -0,0 +1,17 @@
-- CreateTable
CREATE TABLE "segment" (
"segment_id" UUID NOT NULL,
"website_id" UUID NOT NULL,
"name" VARCHAR(200) NOT NULL,
"filters" JSONB NOT NULL,
"created_at" TIMESTAMPTZ(6) DEFAULT CURRENT_TIMESTAMP,
"updated_at" TIMESTAMPTZ(6),
CONSTRAINT "segment_pkey" PRIMARY KEY ("segment_id")
);
-- CreateIndex
CREATE UNIQUE INDEX "segment_segment_id_key" ON "segment"("segment_id");
-- CreateIndex
CREATE INDEX "segment_website_id_idx" ON "segment"("website_id");