References Type in Migrations
The references type in a migration would automatically add an index.
The to_table method1 specifies which table to use.
t.references :follower, null: false, foreign_key: { to_table: :users }
The references type in a migration would automatically add an index.
The to_table method1 specifies which table to use.
t.references :follower, null: false, foreign_key: { to_table: :users }