Fix GH #4285. Remove options when we record calling creat_table

This commit is contained in:
kennyj
2012-01-04 10:25:15 +09:00
parent 63f7a61246
commit 6012970fea
2 changed files with 7 additions and 1 deletions

View File

@@ -59,7 +59,7 @@ module ActiveRecord
private
def invert_create_table(args)
[:drop_table, args]
[:drop_table, [args.first]]
end
def invert_rename_table(args)

View File

@@ -67,6 +67,12 @@ module ActiveRecord
assert_equal [:drop_table, [:system_settings]], drop_table
end
def test_invert_create_table_with_options
@recorder.record :create_table, [:people_reminders, {:id => false}]
drop_table = @recorder.inverse.first
assert_equal [:drop_table, [:people_reminders]], drop_table
end
def test_invert_rename_table
@recorder.record :rename_table, [:old, :new]
rename = @recorder.inverse.first