def self.up
ActiveRecord::Base.connection.tables.each do |table|
next if table == "schema_migrations"
add_column table, :column_name, :column_type
end
end
EDIT:(getting table name from models)
def self.up
Rails.application.eager_load!
ActiveRecord::Base.descendants.each do |model|
add_column model.table_name, :column_name, :column_type
end
end