random login image!

This commit is contained in:
Sean Morley
2024-06-12 17:38:34 +00:00
parent 20b6f826d9
commit 6385f9f46b
11 changed files with 646 additions and 20 deletions

View File

@@ -0,0 +1,12 @@
CREATE TABLE IF NOT EXISTS "images" (
"id" serial PRIMARY KEY NOT NULL,
"url" text NOT NULL,
"type" text NOT NULL,
"adventureId" integer
);
--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "images" ADD CONSTRAINT "images_adventureId_adventures_id_fk" FOREIGN KEY ("adventureId") REFERENCES "adventures"("id") ON DELETE no action ON UPDATE no action;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;