Class: ROM::SQL::Migration::SchemaDiff::AttributeChanged Private

Inherits:
AttributeDiff
  • Object
show all
Defined in:
lib/rom/sql/migration/schema_diff.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Method Summary collapse

Methods inherited from AttributeDiff

#name, #null?, #primary_key?, #unwrap

Instance Method Details

#nullability_changed?Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Boolean)


98
99
100
# File 'lib/rom/sql/migration/schema_diff.rb', line 98

def nullability_changed?
  current.optional? ^ target.optional?
end

#type_changed?Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Boolean)


102
103
104
# File 'lib/rom/sql/migration/schema_diff.rb', line 102

def type_changed?
  clean(current.qualified) != clean(target.qualified)
end