diff options
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb index 03c318f5f7..b08c59d97d 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb @@ -89,7 +89,6 @@ module ActiveRecord else string end - end def cidr_to_string(object) @@ -256,7 +255,7 @@ module ActiveRecord :integer # UUID type when 'uuid' - :string + :uuid # Small and big integer types when /^(?:small|big)int$/ :integer @@ -319,6 +318,10 @@ module ActiveRecord def macaddr(name, options = {}) column(name, 'macaddr', options) end + + def uuid(name, options = {}) + column(name, 'uuid', options) + end end ADAPTER_NAME = 'PostgreSQL' @@ -341,7 +344,8 @@ module ActiveRecord :hstore => { :name => "hstore" }, :inet => { :name => "inet" }, :cidr => { :name => "cidr" }, - :macaddr => { :name => "macaddr" } + :macaddr => { :name => "macaddr" }, + :uuid => { :name => "uuid" } } # Returns 'PostgreSQL' as adapter name for identification purposes. |