Add userVisitedAdventures table and API endpoints for visits and userinfo
This commit is contained in:
12
migrations/0008_romantic_maria_hill.sql
Normal file
12
migrations/0008_romantic_maria_hill.sql
Normal file
@@ -0,0 +1,12 @@
|
||||
CREATE TABLE IF NOT EXISTS "userVisitedAdventures" (
|
||||
"user_id" text NOT NULL,
|
||||
"adventure_name" text NOT NULL,
|
||||
"location" text,
|
||||
"adventure_visited" text
|
||||
);
|
||||
--> statement-breakpoint
|
||||
DO $$ BEGIN
|
||||
ALTER TABLE "userVisitedAdventures" ADD CONSTRAINT "userVisitedAdventures_user_id_user_id_fk" FOREIGN KEY ("user_id") REFERENCES "user"("id") ON DELETE no action ON UPDATE no action;
|
||||
EXCEPTION
|
||||
WHEN duplicate_object THEN null;
|
||||
END $$;
|
||||
Reference in New Issue
Block a user