Skip to content

Commit e63142b

Browse files
authored
Merge pull request #1705 from yahonda/longer_identifier_support_for_add_column
Add spec for `add_column` to support longer identifier
2 parents 1bed3fd + 2b9d8ed commit e63142b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

spec/active_record/connection_adapters/oracle_enhanced/schema_statements_spec.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -882,6 +882,15 @@ class ::TestPost < ActiveRecord::Base; end
882882
expect(TestPost.columns_hash["body"]).not_to be_nil
883883
end
884884

885+
it "should add longer column" do
886+
skip unless @oracle12cr2_or_higher
887+
schema_define do
888+
add_column :test_posts, "a" * 128, :string
889+
end
890+
TestPost.reset_column_information
891+
expect(TestPost.columns_hash["a" * 128]).not_to be_nil
892+
end
893+
885894
it "should add lob column with non_default tablespace" do
886895
ActiveRecord::ConnectionAdapters::OracleEnhancedAdapter.default_tablespaces[:clob] = DATABASE_NON_DEFAULT_TABLESPACE
887896
schema_define do

0 commit comments

Comments
 (0)