diff options
author | Sean Griffin <sean@thoughtbot.com> | 2014-05-19 10:59:57 -0700 |
---|---|---|
committer | Sean Griffin <sean@thoughtbot.com> | 2014-05-19 11:32:13 -0700 |
commit | d0f8c46e1962b28d77209f367f12c2d2c77f4b12 (patch) | |
tree | a20b809cd5b17c706709a51594c0ab1480503c6c /activerecord/test/cases/connection_adapters/type_lookup_test.rb | |
parent | 09cc922ed31bf699b26fafe4822fc7048b821825 (diff) | |
download | rails-d0f8c46e1962b28d77209f367f12c2d2c77f4b12.tar.gz rails-d0f8c46e1962b28d77209f367f12c2d2c77f4b12.tar.bz2 rails-d0f8c46e1962b28d77209f367f12c2d2c77f4b12.zip |
Remove :timestamp column type
The `:timestamp` type for columns is unused. All database adapters treat
them as the same database type. All code in `ActiveRecord` which changes
its behavior based on the column's type acts the same in both cases.
However, when the type is passed to code that checks for the `:datetime`
type, but not `:timestamp` (such as XML serialization), the result is
unexpected behavior.
Existing schema definitions will continue to work, and the `timestamp`
type is transparently aliased to `datetime`.
Diffstat (limited to 'activerecord/test/cases/connection_adapters/type_lookup_test.rb')
-rw-r--r-- | activerecord/test/cases/connection_adapters/type_lookup_test.rb | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/activerecord/test/cases/connection_adapters/type_lookup_test.rb b/activerecord/test/cases/connection_adapters/type_lookup_test.rb index a5b01260d3..18df30faf5 100644 --- a/activerecord/test/cases/connection_adapters/type_lookup_test.rb +++ b/activerecord/test/cases/connection_adapters/type_lookup_test.rb @@ -45,14 +45,11 @@ module ActiveRecord assert_lookup_type :time, 'TIME' end - def test_timestamp_types - assert_lookup_type :timestamp, 'timestamp' - assert_lookup_type :timestamp, 'TIMESTAMP' - end - def test_datetime_types assert_lookup_type :datetime, 'datetime' assert_lookup_type :datetime, 'DATETIME' + assert_lookup_type :datetime, 'timestamp' + assert_lookup_type :datetime, 'TIMESTAMP' end def test_decimal_types |