aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
authorYves Senn <yves.senn@gmail.com>2015-11-24 08:34:05 +0100
committerYves Senn <yves.senn@gmail.com>2015-11-24 08:34:05 +0100
commit9feeaab32925d725ff9a6f9d5b8a903d736f911a (patch)
tree6b569d19ce3cf004febce9cca2234765853c56ad /activerecord/lib/active_record
parentb671ae1eed23dcbcea4ec78d011a4663c582ee07 (diff)
parent3991ebcb36ac6694b35a3d3ab79a6b9c1e48bed1 (diff)
downloadrails-9feeaab32925d725ff9a6f9d5b8a903d736f911a.tar.gz
rails-9feeaab32925d725ff9a6f9d5b8a903d736f911a.tar.bz2
rails-9feeaab32925d725ff9a6f9d5b8a903d736f911a.zip
Merge pull request #22304 from kamipo/schema_dumping_support_for_postgresql_geometric_types
Add schema dumping support for PostgreSQL geometric data types
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r--activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb18
1 files changed, 12 insertions, 6 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
index 5b890339d3..f731da9e18 100644
--- a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
+++ b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
@@ -100,6 +100,12 @@ module ActiveRecord
ltree: { name: "ltree" },
citext: { name: "citext" },
point: { name: "point" },
+ line: { name: "line" },
+ lseg: { name: "lseg" },
+ box: { name: "box" },
+ path: { name: "path" },
+ polygon: { name: "polygon" },
+ circle: { name: "circle" },
bit: { name: "bit" },
bit_varying: { name: "bit varying" },
money: { name: "money" },
@@ -455,15 +461,15 @@ module ActiveRecord
m.register_type 'macaddr', OID::SpecializedString.new(:macaddr)
m.register_type 'citext', OID::SpecializedString.new(:citext)
m.register_type 'ltree', OID::SpecializedString.new(:ltree)
+ m.register_type 'line', OID::SpecializedString.new(:line)
+ m.register_type 'lseg', OID::SpecializedString.new(:lseg)
+ m.register_type 'box', OID::SpecializedString.new(:box)
+ m.register_type 'path', OID::SpecializedString.new(:path)
+ m.register_type 'polygon', OID::SpecializedString.new(:polygon)
+ m.register_type 'circle', OID::SpecializedString.new(:circle)
# FIXME: why are we keeping these types as strings?
m.alias_type 'interval', 'varchar'
- m.alias_type 'path', 'varchar'
- m.alias_type 'line', 'varchar'
- m.alias_type 'polygon', 'varchar'
- m.alias_type 'circle', 'varchar'
- m.alias_type 'lseg', 'varchar'
- m.alias_type 'box', 'varchar'
register_class_with_precision m, 'time', Type::Time
register_class_with_precision m, 'timestamp', OID::DateTime