How To Remove Columns From Rails

[Solved] How To Remove Columns From Rails | Ruby - Code Explorer | yomemimo.com
Question : how to remove columns from rails

Answered by : bright-beaver

rails generate migration RemoveFieldNameFromTableName field_name:datatype
remove_column :table_name, :column_name

Source : https://stackoverflow.com/questions/2831059/how-to-drop-columns-using-rails-migration | Last Update : Fri, 21 Feb 20

Question : rails remove column from model

Answered by : mysterious-manatee-ko06m5e45kjt

class RemoveCountryFromSampleApps < ActiveRecord::Migration[5.0] def change remove_column :sample_apps, :country, :string end
end

Source : | Last Update : Fri, 16 Oct 20

Answers related to how to remove columns from rails

Code Explorer Popular Question For Ruby