Change foreign key column name in rails
<p>I have a <code>Project</code> migration class like this:</p>

<pre><code>class CreateProjects &lt; ActiveRecord::Migration
 def change
  create_table :projects do |t|
   t.string :title
   t.text :description
   t.boolean :public
   t.references :user, index: true, foreign_key: true

   t.timestamps null: false
  end
 end
end
</code></pre>

<p>It creates a column name <code>user_id</code> in projects table but I want to name the column <code>owner_id</code> so I can use <code>project.owner</code> instead of <code>project.user</code>.</p>