Commit Graph

18 Commits

Author SHA1 Message Date
Aaron Patterson
c33b7c42c8 Merge pull request #2716 from jbbarth/fix_invert_rename_index
Fix bad options order in AR::Migration::CommandRecorder#invert_rename_index
2011-09-05 14:18:37 -07:00
David Workman
00c8151d77 Using .try to test for the existence of a method option in a nil-resistent manner. Inlined the determination of the options hash for reversing using a ternary operator. Shortens the method in a way that keeps the code neat 2011-08-22 11:04:31 -07:00
David Workman
9934c97cae Neatened up the invert_add_index method as per suggeston 2011-08-22 11:04:22 -07:00
David Workman
54866b0574 Simple fix for correctly inverting an add_index migration when a name has been provided 2011-08-22 11:04:13 -07:00
Vijay Dev
d764378489 Reversing the changes done in c278a2c while still resolving #1857.
The changes broke bulk migration tests and were fixed in 4d256bc6;
however that brought back the issue of #1857 and so this commit goes
back to the original scenario and just adds change_table to the list
of methods which are to be recorded in the CommandRecorder. The
method_missing now delegates all calls to the underlying connection as
before.
2011-07-03 17:28:03 +01:00
Jon Leighton
22bcb4e093 CommandRecorder should delegate in method_missing where possible. Fixes some tests in migration_test.rb under mysql. The problem was introduced in c278a2c5e1. 2011-06-30 00:48:03 +01:00
Vijay Dev
eb3e523434 record unsupported methods in CommandRecorder instead of letting the unsupported methods go through to the underlying db causing errors like duplicate columns to occur when rolling back migrations 2011-06-28 12:05:52 -07:00
Vijay Dev
fa1aad741d comment the recorder methods 2011-06-06 22:47:04 +02:00
Pratik Naik
30176f28a4 Add :bulk => true option to change_table 2011-01-31 13:21:25 +00:00
Aaron Patterson
a4d9b1d329 adding documentation for reversible migrations 2010-11-19 11:34:42 -08:00
Aaron Patterson
47017bd169 invertable migrations are working 2010-11-19 10:31:03 -08:00
Aaron Patterson
6519df4157 command recorder will record commands sent to a delegate object 2010-11-19 10:24:16 -08:00
Aaron Patterson
0d7410faab updating documentation 2010-11-19 10:24:16 -08:00
Aaron Patterson
96b50a0392 IrreversibleMigration is raised if we cannot invert the command 2010-11-19 10:24:15 -08:00
Aaron Patterson
b29a24bb6f commands are reversed 2010-11-19 10:24:15 -08:00
Aaron Patterson
5d93900dc6 add and remove timestamps can be inverted 2010-11-19 10:24:15 -08:00
Aaron Patterson
24b637a80f inverting add_index 2010-11-19 10:24:15 -08:00
Aaron Patterson
843e319f78 partial implementation of the command recorder 2010-11-19 10:24:15 -08:00