README.md in fast_change_table-1.1.3 vs README.md in fast_change_table-1.2.0

- old
+ new

@@ -1,10 +1,16 @@ #Fast Change Table Use fast\_change\_table instead of change_table in your migrations on large tables of data. Uses a duplication pattern to speed things up. +__Known issues:__ +* Currently fast\_change\_table does not supported in Rails 3 reversible migration method. + + +__Usage:__ + uses ordinary change_table syntax but adds two options * "replace\_keys" to remove all indexes; new indexes will be specified - "disable\_keys" to remove indexes and apply them after data load; this is a tremendous performance enhancement for a dbms with fast index creation; it is active by default. set it to false to prevent its use @@ -27,11 +33,11 @@ enable\_indexes(table, list\_of\_indexes) restores a list of indexes to a table fast\_add\_indexes(table, &block) - allows you to pass a block to add indexes. For mysql creates specified indexes in one statement; allows the data to be scanned once. + allows you to pass a block to add indexes. __Example:__ fast_add_indexes :sometable do |t| @@ -39,16 +45,17 @@ t.index [:some_other_column, :column_three], :name => "a_multicolumn_index" end copy\_table(from\_table, to\_table, remaps = []) -* copies rows from one table into another. this probably only works with Mysql. +* copies rows from one table into another. by default copies data from column of from_table to to_table of same name. will not copy data where there is no corresponding column. the remaps argument can be supplied to tell copy table how to handle unmatched columns or override this behavior + for multiple remap columns provide an array of 2 element arrays __Examples:__ copy_table(old_users_without_email_hash, new_table, ['MD5(email)', 'email_hash']) - copy_table(old_users_without_total, new_table, ['sum(payments)', 'total_payments']) + copy_table(old_users_without_total, new_table, [['sum(payments)', 'total_payments'], ['avg(payments)', 'average_payments']]) \ No newline at end of file