Add uuid datatype support to PostgreSQL adapter #6713

Merged
merged 1 commit into from Jun 14, 2012

Conversation

Projects
None yet
7 participants
Contributor

etehtsea commented Jun 12, 2012

Adds possibility to use uuid-datatype instead of saving uuids in strings.

Hope I didn't messed up anything.

Contributor

dmathieu commented Jun 12, 2012

Awesome. Thanks 👍

@Empact Empact and 2 others commented on an outdated diff Jun 13, 2012

...tive_record/connection_adapters/postgresql_adapter.rb
@@ -341,7 +344,8 @@ def macaddr(name, options = {})
:hstore => { :name => "hstore" },
:inet => { :name => "inet" },
:cidr => { :name => "cidr" },
- :macaddr => { :name => "macaddr" }
+ :macaddr => { :name => "macaddr" },
+ :uuid => { :name => "uuid" },
@Empact

Empact Jun 13, 2012

Contributor

Oh no - it's a spare comma!

@rafaelfranca

rafaelfranca Jun 14, 2012

Owner

Yes, please remove it.

@etehtsea

etehtsea Jun 14, 2012

Contributor

@rafaelfranca, ok, done.

Contributor

gaurish commented Jun 13, 2012

👍

Looks good to me 👍

/cc @tenderlove

Owner

rafaelfranca commented Jun 14, 2012

Looks good to me too 👍

rafaelfranca merged commit 12e9a75 into rails:master Jun 14, 2012

Owner

rafaelfranca commented Jun 14, 2012

Merged. Thanks

@ghost

ghost commented Feb 7, 2013

Does this FIXME comment need to be addressed or removed?

    # FIXME: why are we keeping these types as strings?
    alias_type 'tsvector', 'text'
    alias_type 'interval', 'text'
    alias_type 'bit',      'text'
    alias_type 'varbit',   'text'
    alias_type 'macaddr',  'text'
    alias_type 'uuid',     'text'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment