aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/migration_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/migration_test.rb')
-rw-r--r--activerecord/test/migration_test.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/activerecord/test/migration_test.rb b/activerecord/test/migration_test.rb
index 8a3c1d05ed..d1e2059c9a 100644
--- a/activerecord/test/migration_test.rb
+++ b/activerecord/test/migration_test.rb
@@ -398,6 +398,17 @@ if ActiveRecord::Base.connection.supports_migrations?
end
end
+ def test_rename_column_with_sql_reserved_word
+ begin
+ assert_nothing_raised { Person.connection.rename_column "people", "first_name", "group" }
+ Person.reset_column_information
+ assert Person.column_names.include?("group")
+ ensure
+ Person.connection.remove_column("people", "group") rescue nil
+ Person.connection.add_column("people", "first_name", :string) rescue nil
+ end
+ end
+
def test_rename_table
begin
ActiveRecord::Base.connection.create_table :octopuses do |t|