Changing many columns is not so easy, because change_column forces you to enter all attributes you want (default,limit,null…) again.
So to make less errors we just alter the attributes we want to change and leave the rest alone.
Install
#Inside your migration def self.alter_column(table,column,text) execute("ALTER TABLE #{quote_table_name(table)} ALTER #{quote_column_name(column)} #{text}") end
Usage
# to set the default to nil, without remembering all the other # stuff change_column needs alter_column(:users,:name,"DROP DEFAULT")
So thats very basic, but i hope it helps anyway 🙂