In Ruby on Rails, how to add foreign key constraint in migration?
Would it be enough with adding the following, for example with Products and User models?
Products
User
add_index :products, :user_id