From 5d93900dc6a423fe8d7b0c6e330deeaca4b8b72c Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Thu, 18 Nov 2010 15:07:25 -0800 Subject: add and remove timestamps can be inverted --- activerecord/lib/active_record/migration/command_recorder.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'activerecord/lib/active_record/migration/command_recorder.rb') diff --git a/activerecord/lib/active_record/migration/command_recorder.rb b/activerecord/lib/active_record/migration/command_recorder.rb index 032ce3aad8..231e981e53 100644 --- a/activerecord/lib/active_record/migration/command_recorder.rb +++ b/activerecord/lib/active_record/migration/command_recorder.rb @@ -48,6 +48,14 @@ module ActiveRecord table, columns, _ = *args [:remove_index, [table, {:column => columns}]] end + + def invert_remove_timestamps(args) + [:add_timestamps, args] + end + + def invert_add_timestamps(args) + [:remove_timestamps, args] + end end end end -- cgit v1.2.3