22 lines
808 B
SQL
22 lines
808 B
SQL
CREATE TABLE "feedback" (
|
|
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
|
|
"tv_show_name" text NOT NULL,
|
|
"stars" integer NOT NULL,
|
|
"feedback" text DEFAULT '' NOT NULL,
|
|
"created_at" timestamp DEFAULT now() NOT NULL
|
|
);
|
|
--> statement-breakpoint
|
|
CREATE TABLE "recommendations" (
|
|
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
|
|
"title" text NOT NULL,
|
|
"main_prompt" text NOT NULL,
|
|
"liked_shows" text DEFAULT '' NOT NULL,
|
|
"disliked_shows" text DEFAULT '' NOT NULL,
|
|
"themes" text DEFAULT '' NOT NULL,
|
|
"brainstorm_count" integer DEFAULT 100 NOT NULL,
|
|
"recommendations" jsonb,
|
|
"status" text DEFAULT 'pending' NOT NULL,
|
|
"created_at" timestamp DEFAULT now() NOT NULL
|
|
);
|
|
--> statement-breakpoint
|
|
CREATE UNIQUE INDEX "feedback_tv_show_name_idx" ON "feedback" USING btree ("tv_show_name"); |