Skip to content

Commit

Permalink
Use shorter prefix and suffix as in Oracle database identifier
Browse files Browse the repository at this point in the history
cannot be larger than 30 characters
  • Loading branch information
yahonda committed Mar 7, 2013
1 parent 51ae6f4 commit 5d57b82
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions activerecord/test/cases/ar_schema_test.rb
Expand Up @@ -11,8 +11,8 @@ def setup


def teardown def teardown
@connection.drop_table :fruits rescue nil @connection.drop_table :fruits rescue nil
@connection.drop_table :"_pre_fruits_suf_" rescue nil @connection.drop_table :"_p_fruits_s_" rescue nil
@connection.drop_table :"_pre_schema_migrations_suf_" rescue nil @connection.drop_table :"_p_schema_migrations_s_" rescue nil
end end


def test_schema_define def test_schema_define
Expand All @@ -24,8 +24,9 @@ def test_schema_define
end end


def test_schema_define_with_table_prefix_and_suffix def test_schema_define_with_table_prefix_and_suffix
ActiveRecord::Base.table_name_prefix = '_pre_' # Use shorter prefix and suffix as in Oracle database identifier cannot be larger than 30 characters
ActiveRecord::Base.table_name_suffix = '_suf_' ActiveRecord::Base.table_name_prefix = '_p_'
ActiveRecord::Base.table_name_suffix = '_s_'


perform_schema_define! perform_schema_define!


Expand Down

0 comments on commit 5d57b82

Please sign in to comment.