You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds 'References' section to migrations guide, sorts column modifiers lists and adds 'collation' option documentation
* Creates 'References' section in ActiveRecord migrations guide and moves all 'add_reference' specific column modifiers information into this section
* Adds the :collation option to the list of column modifiers section of the ActiveRecord migrations guide
* Adds the :collation option to the documentation of ConnectionAdapters::SchemaStatements#add_column
* Improves both lists of column modifiers by copying from one another
* Sorts the lists of column modifiers alphabetically
The polymorphic option will create two columns on the taggings table which can
526
+
be used for polymorphic assocations: `taggable_type` and `taggable_id`.
527
+
528
+
A foreign key can be created with the the `foreign_key` option.
529
+
530
+
```ruby
531
+
add_reference :users, :role, foreign_key:true
532
+
```
533
+
534
+
For more `add_reference` options, visit the [API documentation](https://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/SchemaStatements.html#method-i-add_reference).
0 commit comments