Skip to content

Commit

Permalink
Merge pull request rails#5837 from yahonda/new_sequence_name_is_too_long
Browse files Browse the repository at this point in the history
Fix ORA-00972 error at test_rename_table_with_prefix_and_suffix
  • Loading branch information
jonleighton committed Apr 14, 2012
2 parents 789bade + 7d65585 commit d1f4cda
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions activerecord/test/cases/migration_test.rb
Expand Up @@ -36,7 +36,7 @@ def teardown
ActiveRecord::Base.connection.initialize_schema_migrations_table ActiveRecord::Base.connection.initialize_schema_migrations_table
ActiveRecord::Base.connection.execute "DELETE FROM #{ActiveRecord::Migrator.schema_migrations_table_name}" ActiveRecord::Base.connection.execute "DELETE FROM #{ActiveRecord::Migrator.schema_migrations_table_name}"


%w(things awesome_things prefix_things_suffix prefix_awesome_things_suffix).each do |table| %w(things awesome_things prefix_things_suffix p_awesome_things_s ).each do |table|
Thing.connection.drop_table(table) rescue nil Thing.connection.drop_table(table) rescue nil
end end
Thing.reset_column_information Thing.reset_column_information
Expand Down Expand Up @@ -278,8 +278,8 @@ def test_proper_table_name


def test_rename_table_with_prefix_and_suffix def test_rename_table_with_prefix_and_suffix
assert !Thing.table_exists? assert !Thing.table_exists?
ActiveRecord::Base.table_name_prefix = 'prefix_' ActiveRecord::Base.table_name_prefix = 'p_'
ActiveRecord::Base.table_name_suffix = '_suffix' ActiveRecord::Base.table_name_suffix = '_s'
Thing.reset_table_name Thing.reset_table_name
Thing.reset_sequence_name Thing.reset_sequence_name
WeNeedThings.up WeNeedThings.up
Expand All @@ -288,7 +288,7 @@ def test_rename_table_with_prefix_and_suffix
assert_equal "hello world", Thing.find(:first).content assert_equal "hello world", Thing.find(:first).content


RenameThings.up RenameThings.up
Thing.table_name = "prefix_awesome_things_suffix" Thing.table_name = "p_awesome_things_s"


assert_equal "hello world", Thing.find(:first).content assert_equal "hello world", Thing.find(:first).content
ensure ensure
Expand Down

0 comments on commit d1f4cda

Please sign in to comment.