Skip to content

Commit

Permalink
Merge pull request #16181 from yahonda/ora972_faces_41
Browse files Browse the repository at this point in the history
Address ORA-00972: identifier is too long when tested with Oracle
  • Loading branch information
rafaelfranca committed Jul 15, 2014
2 parents 08e528d + c5ab350 commit 9e5cab2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion activerecord/test/models/face.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
class Face < ActiveRecord::Base
belongs_to :man, :inverse_of => :face
belongs_to :polymorphic_man, :polymorphic => true, :inverse_of => :polymorphic_face
belongs_to :polymorphic_man_without_inverse, :polymorphic => true
# Oracle identifier lengh is limited to 30 bytes or less, `polymorphic` renamed `poly`
belongs_to :poly_man_without_inverse, :polymorphic => true
# These is a "broken" inverse_of for the purposes of testing
belongs_to :horrible_man, :class_name => 'Man', :inverse_of => :horrible_face
belongs_to :horrible_polymorphic_man, :polymorphic => true, :inverse_of => :horrible_polymorphic_face
Expand Down
2 changes: 1 addition & 1 deletion activerecord/test/models/man.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
class Man < ActiveRecord::Base
has_one :face, :inverse_of => :man
has_one :polymorphic_face, :class_name => 'Face', :as => :polymorphic_man, :inverse_of => :polymorphic_man
has_one :polymorphic_face_without_inverse, :class_name => 'Face', :as => :polymorphic_man_without_inverse
has_one :polymorphic_face_without_inverse, :class_name => 'Face', :as => :poly_man_without_inverse
has_many :interests, :inverse_of => :man
has_many :polymorphic_interests, :class_name => 'Interest', :as => :polymorphic_man, :inverse_of => :polymorphic_man
# These are "broken" inverse_of associations for the purposes of testing
Expand Down
4 changes: 2 additions & 2 deletions activerecord/test/schema/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -775,8 +775,8 @@ def create_table(*args, &block)
t.integer :man_id
t.integer :polymorphic_man_id
t.string :polymorphic_man_type
t.integer :polymorphic_man_without_inverse_id
t.string :polymorphic_man_without_inverse_type
t.integer :poly_man_without_inverse_id
t.string :poly_man_without_inverse_type
t.integer :horrible_polymorphic_man_id
t.string :horrible_polymorphic_man_type
end
Expand Down

0 comments on commit 9e5cab2

Please sign in to comment.