Class: ActiveRecord::ConnectionAdapters::MysqlAdapter

Inherits:
AbstractAdapter
  • Object
show all
Defined in:
lib/mysql_schema_bulk_change/mysql_adapter.rb

Instance Method Summary collapse

Instance Method Details

#change_table(table_name) {|Table.new(table_name, bulk_updater)| ... } ⇒ Object

Yields:

  • (Table.new(table_name, bulk_updater))


135
136
137
138
139
# File 'lib/mysql_schema_bulk_change/mysql_adapter.rb', line 135

def change_table(table_name)
  bulk_updater = MysqlBulkProxy.new(table_name, self)
  yield Table.new(table_name, bulk_updater)
  bulk_updater.update_database
end

#change_table_directObject

Changed to return a proxy for collecting the changes and do bulk updates



134
# File 'lib/mysql_schema_bulk_change/mysql_adapter.rb', line 134

alias_method :change_table_direct, :change_table