Class: Migrant::InheritedSchema
Instance Attribute Summary collapse
-
#parent_schema ⇒ Object
Returns the value of attribute parent_schema.
Attributes inherited from Schema
#columns, #indexes, #validations
Instance Method Summary collapse
- #add_association(association) ⇒ Object
-
#initialize(parent_schema) ⇒ InheritedSchema
constructor
A new instance of InheritedSchema.
- #requires_migration? ⇒ Boolean
Methods inherited from Schema
#add_field, #column_migrations, #define_structure, #partial?
Constructor Details
#initialize(parent_schema) ⇒ InheritedSchema
Returns a new instance of InheritedSchema.
98 99 100 101 102 |
# File 'lib/migrant/schema.rb', line 98 def initialize(parent_schema) @parent_schema = parent_schema @columns = Hash.new @indexes = Array.new end |
Instance Attribute Details
#parent_schema ⇒ Object
Returns the value of attribute parent_schema.
96 97 98 |
# File 'lib/migrant/schema.rb', line 96 def parent_schema @parent_schema end |
Instance Method Details
#add_association(association) ⇒ Object
108 109 110 |
# File 'lib/migrant/schema.rb', line 108 def add_association(association) parent_schema.add_association(association) end |
#requires_migration? ⇒ Boolean
104 105 106 |
# File 'lib/migrant/schema.rb', line 104 def requires_migration? false # All added to base table end |