Methods

DataMapper::Migrations::PostgresAdapter::ClassMethods

Public Instance Methods

type_map() click to toggle source

Types for PostgreSQL databases.

@return [Hash] types for PostgreSQL databases.

@api private

# File lib/dm-migrations/adapters/dm-postgres-adapter.rb, line 145
def type_map
  precision = Property::Numeric.precision
  scale     = Property::Decimal.scale

  super.merge(
    Property::Binary => { :primitive => 'BYTEA'                                                      },
    BigDecimal       => { :primitive => 'NUMERIC',          :precision => precision, :scale => scale },
    Float            => { :primitive => 'DOUBLE PRECISION'                                           }
  ).freeze
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.