Remove a column with migration:

rails g migration RemoveCountryFromSampleApps country:string
This will generate the following migration in Rails 5.0:
class RemoveCountryFromSampleApps < ActiveRecord::Migration[5.0]
  def change
    remove_column :sample_apps, :country, :string
  end
end

Comments

Popular posts from this blog

User Login And Logout Show Notice Box Massage

Add CORS to Nginx on AWS Elastic Beanstalk