Answers for "how to delete a table in activerecord db migration"

5

how to delete a table in rails

rails g migration DropProducts

class DropProducts < ActiveRecord::Migration
  def change
    drop_table :products
  end
end
Posted by: Guest on February-14-2020

Code answers related to "how to delete a table in activerecord db migration"

Browse Popular Code Answers by Language