title: Rails 5 model a many to many relationship
body: <p>I have two models, project and users and I want to connect them as follows:</p>
  
  <pre><code>class Project &lt; ApplicationRecord
    belongs_to :owner, class_name: "User"
    has_many :members, class_name: "User"
  end
  
  class User &lt; ApplicationRecord
    has_many :projects
  end
  </code></pre>
  
  <p>Migration looks like this.</p>
  
  <pre><code>class AddReferencesToProject &lt; ActiveRecord::Migration[5.2]
    def change
      add_reference :projects, :owner
      add_foreign_key :projects, :users, column: :owner_id, primary_key: :id
    end
  end
  </code></pre>
  
  <p>I did this migration for members_id but I want it to have more then one user_id:</p>
  
  <pre><code>class AddMembersReferencesToProject &lt; ActiveRecord::Migration[5.2]
    def change
      add_reference :projects, :members
      add_foreign_key :projects, :users, column: :members_id, primary_key: :id
    end
  end
  </code></pre>
  
  <p>Do I need to make a many_to many :through association? I´m stuck on this.</p>