title: Rails recursive association with migrations
body: <p>I have a table named Nodes. Each node belongs to one father of the same table, and has one child on the same table too. This is the Node model:</p>
  
  <pre><code>class Node &lt; ApplicationRecord
      belongs_to :parent # I tried using :node instead of :parent
      has_one :children # Same than above
  end
  </code></pre>
  
  <p>How can I easily achieve this?</p>