lib/dm-pg-json.rb in dm-pg-json-0.1.0 vs lib/dm-pg-json.rb in dm-pg-json-0.1.1
- old
+ new
@@ -9,11 +9,11 @@
module Migrations
module PostgresAdapter
def property_schema_hash(property)
schema = super
- if property.kind_of?(::DataMapper::Property::PgJSON)
+ if property.kind_of?(Property::PgJSON)
schema.delete(:length)
end
schema
end
@@ -30,10 +30,10 @@
#
# @return [Hash] types for PostgreSQL databases.
#
# @api private
def type_map
- super.merge(::DataMapper::Property::PgJSON => {:primitive => 'JSON'}).freeze
+ super.merge(Property::PgJSON => {:primitive => 'JSON'}).freeze
end
end
end
end
DataMapper::Adapters::PostgresAdapter.send(:include, ::DataMapper::PostgresJSON)