diff options
author | Andrew White <andyw@pixeltrix.co.uk> | 2010-04-04 17:34:23 +0100 |
---|---|---|
committer | Andrew White <andyw@pixeltrix.co.uk> | 2010-04-04 17:34:23 +0100 |
commit | 00884a59013a658082dab41da5ff41add31b8c43 (patch) | |
tree | 666b862b08b04c7a3727ee22b2cd1a2561af4e52 /activerecord/lib/active_record/connection_adapters | |
parent | 48b2451142355b22de5f8130b3debdd4e53e2ba2 (diff) | |
parent | 7d7e0627a0490b6b4ddb0ee5429264ccd46f1245 (diff) | |
download | rails-00884a59013a658082dab41da5ff41add31b8c43.tar.gz rails-00884a59013a658082dab41da5ff41add31b8c43.tar.bz2 rails-00884a59013a658082dab41da5ff41add31b8c43.zip |
Merge branch 'master' of github.com:lifo/docrails
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb | 3 | ||||
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb | 6 |
2 files changed, 8 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb b/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb index 046825d43f..6c477e48ce 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb @@ -23,7 +23,8 @@ module ActiveRecord # # +name+ is the column's name, such as <tt>supplier_id</tt> in <tt>supplier_id int(11)</tt>. # +default+ is the type-casted default value, such as +new+ in <tt>sales_stage varchar(20) default 'new'</tt>. - # +sql_type+ is only used to extract the column's length, if necessary. For example +60+ in <tt>company_name varchar(60)</tt>. + # +sql_type+ is used to extract the column's length, if necessary. For example +60+ in <tt>company_name varchar(60)</tt>. + # It will be mapped to one of the standard Rails SQL types in the <tt>type</tt> attribute. # +null+ determines if this column allows +NULL+ values. def initialize(name, default, sql_type = nil, null = true) @name, @sql_type, @null = name, sql_type, null diff --git a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb index a6042e1382..2395a744a3 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb @@ -114,6 +114,12 @@ module ActiveRecord # Object identifier types when /^oid$/ :integer + # UUID type + when /^uuid$/ + :string + # Small and big integer types + when /^(?:small|big)int$/ + :integer # Pass through all types that are not specific to PostgreSQL. else super |