I believe change_table, perhaps in combination with the bulk option, will do
what you want.
http://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/SchemaStatements.html#method-i-change_table
> On Oct 17, 2015, at 7:25 AM, Gaurish Sharma wrote:
>
> To add 2 new cols to existing tab
To add 2 new cols to existing table in migration, we will have to do:
add_column :my_table, :col1, :string
add_column :my_table, :col2, :string
this will create 2 ALTER table statements.
Alter table my_table add column col1 varchar(255)
Alter table my_table add column col2 varchar(255)
I