thickpaddy/mysql_big_table_migration — pull request #2 by nickewing (2012-07-24 18:18:32+00:00)
Title: Add support for mysql2 adapter, fix rename_column, improve test coverage

These changes allow for the use of the mysql2 adapter (https://github.com/brianmario/mysql2/).

They also fix a data loss problem with rename_column when used with with_tmp_table. Prior to these changes when a column was renamed, the data would not be copied from the old column to the new column because the list of columns to be copied equaled the intersection of the old columns and the new columns. With this change we define the column lists like so:

```ruby
shared_columns = old_column_names & new_column_names
old_column_list = column_list(shared_columns + rename_columns.keys)
new_column_list = column_list(shared_columns + rename_columns.values)
```

where `rename_columns` is a hash of the old column name to the new column name