segment migration and support

This commit is contained in:
Francis Cao 2025-06-04 08:47:42 -07:00
parent 42be91b736
commit 1840b8b419
8 changed files with 1484 additions and 1412 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");