module DataMapper::Migrations::PostgresAdapter
Public Instance Methods
property_schema_hash(property)
click to toggle source
Calls superclass method
# File lib/dm-postgres-types.rb, line 22 def property_schema_hash(property) schema = super if property.kind_of?(Property::PgNumericArray) schema[:primitive] = "#{schema[:primitive]}(#{property.precision},#{property.scale})[]" schema[:precision] = schema[:scale] = nil elsif property.kind_of?(Property::PgArray) schema[:primitive] = "#{schema[:primitive]}[]" schema[:length] = nil elsif property.kind_of?(Property::PgJSON) schema.delete(:length) end schema end