Hi there,
I created the stackoverflow_dba database using schema.sql, then the foreign key error was reported when loading the data.
ERROR: Key (postid)=(22) is not present in table "posts".insert or update on table "votes" violates foreign key constraint "votes_postid_fkey"
ERROR: insert or update on table "votes" violates foreign key constraint "votes_postid_fkey"
SQL state: 23503
Detail: Key (postid)=(22) is not present in table "posts".
So should I use schema_nofk.sql instead?
Thanks very much!
Hi there,
I created the stackoverflow_dba database using schema.sql, then the foreign key error was reported when loading the data.
ERROR: Key (postid)=(22) is not present in table "posts".insert or update on table "votes" violates foreign key constraint "votes_postid_fkey"
ERROR: insert or update on table "votes" violates foreign key constraint "votes_postid_fkey"
SQL state: 23503
Detail: Key (postid)=(22) is not present in table "posts".
So should I use schema_nofk.sql instead?
Thanks very much!