Skip to content

Commit 12f9bdc

Browse files
committed
Remove references option it's deprecated since Rails 7.1
1 parent cea3d1d commit 12f9bdc

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

test/fixtures/active_record.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,11 +324,11 @@
324324

325325
create_table :related_things, force: true do |t|
326326
t.string :name
327-
t.references :from, references: :thing
328-
t.references :to, references: :thing
329327

330328
t.timestamps null: false
331329
end
330+
add_reference :related_things, :from, foreign_key: { to_table: :things }
331+
add_reference :related_things, :to, foreign_key: { to_table: :things }
332332

333333
create_table :questions, force: true do |t|
334334
t.string :text

0 commit comments

Comments
 (0)