aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
authorJefferson Lai <jefflai2@gmail.com>2014-04-24 04:20:30 -0700
committerJefferson Lai <jefflai2@gmail.com>2014-04-24 10:16:13 -0700
commitd080e8c201b7200f7f851c7d837cd658968c5255 (patch)
treed911e4b152f696ebcb3f37d133112208b7ce14ba /activerecord/lib
parent43101ab3afe2a008d50cd78069e3bd94736da07d (diff)
downloadrails-d080e8c201b7200f7f851c7d837cd658968c5255.tar.gz
rails-d080e8c201b7200f7f851c7d837cd658968c5255.tar.bz2
rails-d080e8c201b7200f7f851c7d837cd658968c5255.zip
PostgreSQL Timestamps always map to `:datetime`.
The PG Adapter should use `:datetime` consistently instead of mapping mispellings to `:timestamp`. See #14513
Diffstat (limited to 'activerecord/lib')
-rw-r--r--activerecord/lib/active_record/connection_adapters/postgresql/oid.rb7
1 files changed, 1 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 9e898015a6..540b3694b5 100644
--- a/activerecord/lib/active_record/connection_adapters/postgresql/oid.rb
+++ b/activerecord/lib/active_record/connection_adapters/postgresql/oid.rb
@@ -209,12 +209,7 @@ This is not reliable and will be removed in the future.
class Timestamp < Type
def type; :timestamp; end
def simplified_type(sql_type)
- case sql_type
- when /^timestamp with(?:out)? time zone$/
- :datetime
- else
- :timestamp
- end
+ :datetime
end
def type_cast(value)