Class: Migrant::InheritedSchema

Inherits:
Schema
  • Object
show all
Defined in:
lib/migrant/schema.rb

Instance Attribute Summary collapse

Attributes inherited from Schema

#columns, #indexes, #validations

Instance Method Summary collapse

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_schemaObject

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

Returns:

  • (Boolean)


104
105
106
# File 'lib/migrant/schema.rb', line 104

def requires_migration?
  false # All added to base table
end