We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
references
1 parent cea3d1d commit 12f9bdcCopy full SHA for 12f9bdc
1 file changed
test/fixtures/active_record.rb
@@ -324,11 +324,11 @@
324
325
create_table :related_things, force: true do |t|
326
t.string :name
327
- t.references :from, references: :thing
328
- t.references :to, references: :thing
329
330
t.timestamps null: false
331
end
+ add_reference :related_things, :from, foreign_key: { to_table: :things }
+ add_reference :related_things, :to, foreign_key: { to_table: :things }
332
333
create_table :questions, force: true do |t|
334
t.string :text
0 commit comments