Module: DataMapper::Migrations::PostgresAdapter::ClassMethods

Defined in:
lib/dm-core/migrations.rb

Instance Method Summary collapse

Instance Method Details

#type_mapHash

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.

Types for PostgreSQL databases.

Returns:

  • (Hash)

    types for PostgreSQL databases.



711
712
713
714
715
716
717
718
719
# File 'lib/dm-core/migrations.rb', line 711

def type_map
  precision = Property::DEFAULT_PRECISION
  scale     = Property::DEFAULT_SCALE_BIGDECIMAL

  @type_map ||= super.merge(
    BigDecimal => { :primitive => 'NUMERIC', :precision => precision, :scale => scale },
    Float      => { :primitive => 'DOUBLE PRECISION'                                  }
  ).freeze
end