Class: Mxrb::Runtime::SchemaMigrationPlan

Inherits:
Data
  • Object
show all
Defined in:
lib/mxrb/runtime/schema_migrator.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#removed_associationsObject (readonly)

Returns the value of attribute removed_associations

Returns:

  • (Object)

    the current value of removed_associations



39
40
41
# File 'lib/mxrb/runtime/schema_migrator.rb', line 39

def removed_associations
  @removed_associations
end

#removed_attributesObject (readonly)

Returns the value of attribute removed_attributes

Returns:

  • (Object)

    the current value of removed_attributes



39
40
41
# File 'lib/mxrb/runtime/schema_migrator.rb', line 39

def removed_attributes
  @removed_attributes
end

#removed_entitiesObject (readonly)

Returns the value of attribute removed_entities

Returns:

  • (Object)

    the current value of removed_entities



39
40
41
# File 'lib/mxrb/runtime/schema_migrator.rb', line 39

def removed_entities
  @removed_entities
end

Instance Method Details

#changesObject



46
# File 'lib/mxrb/runtime/schema_migrator.rb', line 46

def changes = [*removed_entities, *removed_attributes, *removed_associations].freeze

#destructive?Boolean

Returns:

  • (Boolean)


42
43
44
# File 'lib/mxrb/runtime/schema_migrator.rb', line 42

def destructive?
  removed_entities.any? || removed_attributes.any? || removed_associations.any?
end