ppppp
ppppp
DTDrizzle Team
Created by ppppp on 9/6/2024 in #help
column "foo" referenced in foreign key constraint does not exist
i got an error when i migrating, the error is this:
PostgresError: column "person_id" referenced in foreign key constraint does not exist
PostgresError: column "person_id" referenced in foreign key constraint does not exist
this is the query that throw error:
DO $$ BEGIN
ALTER TABLE "story" ADD CONSTRAINT "story_person_id_person_id_fk" FOREIGN KEY ("person_id") REFERENCES "public"."person"("id") ON DELETE no action ON UPDATE no action;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
DO $$ BEGIN
ALTER TABLE "story" ADD CONSTRAINT "story_person_id_person_id_fk" FOREIGN KEY ("person_id") REFERENCES "public"."person"("id") ON DELETE no action ON UPDATE no action;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
you can see the schema in the reply.
3 replies
DTDrizzle Team
Created by ppppp on 8/30/2024 in #help
Unique constraint typescript error
No description
7 replies