same answer from drharris :
rails generate migration add_newvariableone_and_newvariabletwo_to_modelpluralname newvariableone:string newvariabletwo:string
it will create a ruby ββfile inside db / migrate where the contents are of type
class AddNewVariableOneAndNewVariableTwoToModelPluralname < ActiveRecord::Migration def self.up add_column :modelpluralname, :newvariableone, :string add_column :modelpluralname, :newvariabletwo, :string end def self.down remove_column :modelpluralname, :newvariableone remove_column :modelpluralname, :newvariableone end end
hope this helps you thank
source share