PostgresError: column <column_name> referenced in foreign key constraint does not exist
I have this simple schema in which I am trying to create a one-to-many relationship between option and optionValue tables. However when running migration script I get the following error.
PostgresError: column "option_id" referenced in foreign key constraint does not exist
I am new to postgres and relational databases in general and I don't get what is causing this. What I think I am doing is adding a
values
column to my option
table, and then assigning optionId
column of my optionValue
table to referenced value of option.id column. I am pretty sure this is how it's also realized in the docs, but I might've overlooked something...0 Replies