rails migration remove table code example
Example 1: how to delete a table in rails
rails g migration DropProducts
class DropProducts < ActiveRecord::Migration
def change
drop_table :products
end
end
Example 2: rails migration remove column
rails g migration Remove..From.. col1:type col2:type col3:type
#Exemple :
rails g migration RemoveCountryFromSampleApps country:string
Example 3: ruby on rails db migrate
rails db:migrate