DEV Community

Discussion on: Multiple Foreign Keys for the Same Relationship in Rails 6

Collapse
 
chase439 profile image
Chase

If you have data in these tables (e.g. when changing the tables instead of creating them), you need to make sure the columns have valid values before adding foreign key constraints.

Collapse
 
luchiago profile image
Lucas Hiago

You mean, for the available_user and requester_user variables?

Collapse
 
chase439 profile image
Chase

I mean data records in these tables (not variables).