Module: DataMapper::Migrations::PostgresAdapter::ClassMethods
- Defined in:
- lib/dm-migrations/adapters/dm-postgres-adapter.rb
Instance Method Summary collapse
-
#type_map ⇒ Hash
private
Types for PostgreSQL databases.
Instance Method Details
#type_map ⇒ Hash
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.
139 140 141 142 143 144 145 146 147 148 |
# File 'lib/dm-migrations/adapters/dm-postgres-adapter.rb', line 139 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 |