By release of rails 4.2 add_foreign_key method was introduced. As far as I understand it is used as combo of migration with model:references
and add_index
.
Let's say I only use PostreSQL. (add_foreign_key
is limited to MySQL and PostreSQL). Should stop using migration model:references
with add_index
and start using add_foreign_key
only?. If yes/no, why?. What are benefits of new add_foreign_key
method? Is it worth to swap?