I have this schema.
And I would like to change the relationship as follows.
I am not sure what is the best way to do it without breaking anything.
Reverting or rollback the create_varieties_wines migration ?
class CreateVarietiesWines < ActiveRecord::Migration[6.1]
def change
create_table :varieties_wines do |t|
t.references :wine, null: false, foreign_key: true
t.references :variety, null: false, foreign_key: true
t.timestamps
end
end
end

