media: webtoon metadata (English title, artist, synopsis, years, adaptation) and stored covers with a cover grid
Deploy production / deploy (push) Successful in 1m24s

This commit is contained in:
stan committed 2026-10-27 09:41:12 +00:00
1 parent 96d7333fe9
commit 3a2d3cc78c
10 files changed
+46302 -22

No files matched your search

@@ -0,0 +1,19 @@
CREATE TABLE "media"."covers" (
"item_id" integer PRIMARY KEY,
"mime" text NOT NULL,
"bytes" bytea NOT NULL,
"source_url" text,
"updated_at" timestamp with time zone DEFAULT now() NOT NULL,
CONSTRAINT "covers_mime_check" CHECK ("mime" IN ('image/jpeg','image/png','image/webp','image/gif')),
CONSTRAINT "covers_size_check" CHECK (octet_length("bytes") BETWEEN 1 AND 2000000)
);
--> statement-breakpoint
ALTER TABLE "media"."items" ADD COLUMN "title_en" text;--> statement-breakpoint
ALTER TABLE "media"."items" ADD COLUMN "artist" text;--> statement-breakpoint
ALTER TABLE "media"."items" ADD COLUMN "synopsis" text;--> statement-breakpoint
ALTER TABLE "media"."items" ADD COLUMN "year_start" integer;--> statement-breakpoint
ALTER TABLE "media"."items" ADD COLUMN "year_end" integer;--> statement-breakpoint
ALTER TABLE "media"."items" ADD COLUMN "adaptation" text;--> statement-breakpoint
ALTER TABLE "media"."items" ADD COLUMN "source_ref" text;--> statement-breakpoint
ALTER TABLE "media"."covers" ADD CONSTRAINT "covers_item_id_items_id_fkey" FOREIGN KEY ("item_id") REFERENCES "media"."items"("id") ON DELETE CASCADE;--> statement-breakpoint
ALTER TABLE "media"."items" ADD CONSTRAINT "items_years_check" CHECK (("year_start" IS NULL OR "year_start" BETWEEN 1900 AND 2100) AND ("year_end" IS NULL OR "year_end" BETWEEN 1900 AND 2100));