title: What is the best practice when it comes to deleting a table in the Ruby on Rails migration?
body: <p>I created a few tables last week and I was told to delete them. The suggested way in which I should do it looks like this:</p>
  
  <p><strong>Sample table:</strong></p>
  
  <pre><code>class CreateMenuTable &lt; ActiveRecord::Migration
    def change
      create_table :menus do |t|
        t.string :name
  
        t.timestamps null: false
      end
    end
  end
  </code></pre>
  
  <pre><code>class CreateSpreeMenuRole &lt; ActiveRecord::Migration
    def change
      create_table :menu_roles do |t|
        t.belongs_to :role, class_name: 'Role'
        t.belongs_to :menu, class_name: 'Menu'
  
        t.timestamps null: false
      end
    end
  end
  </code></pre>
  
  <p><strong>step 1.</strong> <code>bin/rake db:rollback STEP=6</code></p>
  
  <p><strong>step 2.</strong> after rolling back I have to comment out those tables then</p>
  
  <p><strong>step 3.</strong> <code>bin/rake db:migrate</code> </p>
  
  <p>Btw we still have multiple tables created after that, that's why we still need to run <code>migrate</code>.</p>