Files
buzz-sheet/drizzle/0033_true_captain_marvel.sql
gunshiz 03149a1499
CI / Verify (push) Successful in 1m25s
CI / Build immutable images and deploy (push) Has been cancelled
feat : update
2026-09-06 15:07:28 +07:00

14 lines
1010 B
SQL

CREATE TABLE "guides"."guide_poster_bleeding" (
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
"guide_id" uuid NOT NULL,
"media_id" uuid NOT NULL,
"amount" integer DEFAULT 100 NOT NULL,
"scale" integer DEFAULT 100 NOT NULL,
"sort_order" integer DEFAULT 0 NOT NULL,
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
"updated_at" timestamp with time zone DEFAULT now() NOT NULL
);
--> statement-breakpoint
ALTER TABLE "guides"."guide_poster_bleeding" ADD CONSTRAINT "guide_poster_bleeding_guide_id_guide_id_fk" FOREIGN KEY ("guide_id") REFERENCES "guides"."guide"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
ALTER TABLE "guides"."guide_poster_bleeding" ADD CONSTRAINT "guide_poster_bleeding_media_id_media_id_fk" FOREIGN KEY ("media_id") REFERENCES "media"."media"("id") ON DELETE restrict ON UPDATE no action;--> statement-breakpoint
CREATE INDEX "guide_poster_bleeding_order_idx" ON "guides"."guide_poster_bleeding" USING btree ("guide_id","sort_order");