diff options
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/postgresql/oid.rb | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql/oid.rb b/activerecord/lib/active_record/connection_adapters/postgresql/oid.rb index cf6a375704..a32915f363 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql/oid.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql/oid.rb @@ -204,11 +204,8 @@ This is not reliable and will be removed in the future. end end - class Timestamp < Type - def type; :timestamp; end - def simplified_type(sql_type) - :datetime - end + class DateTime < Type + def type; :datetime; end def type_cast(value) return if value.nil? @@ -483,7 +480,7 @@ This is not reliable and will be removed in the future. register_type 'bool', OID::Boolean.new register_type 'bit', OID::Bit.new alias_type 'varbit', 'bit' - register_type 'timestamp', OID::Timestamp.new + register_type 'timestamp', OID::DateTime.new alias_type 'timestamptz', 'timestamp' register_type 'date', OID::Date.new register_type 'time', OID::Time.new |