title: Remove foreign key from a table - Ruby on rails
body: <p>I need to remove a foreign key from a table with migrations</p>
  
  <p>This is the table where I have the foreign key:</p>
  
  <pre><code>class CreatePriceWorkshops &lt; ActiveRecord::Migration
    def change
      create_table :price_workshops do |t|
        t.float :price
  
        t.timestamps null: false
      end
    end
  end
  </code></pre>
  
  <p>With this migration I create the foreign key:</p>
  
  <pre><code>class AddTypeMoneysToPriceWorkshops &lt; ActiveRecord::Migration
    def change
      add_reference :price_workshops, :type_money, index: true, foreign_key: true
    end
  end
  </code></pre>
  
  <p>With this I try to remove the foreign key</p>
  
  <pre><code>class RemoveTypeMoneyFromPriceWorkshops &lt; ActiveRecord::Migration
    def change
      remove_column :price_workshops, :type_money_id, :integer
    end
  end
  </code></pre>