diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2015-02-10 09:04:47 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2015-02-12 07:23:53 +0900 |
commit | 1502caefd30b137fd1a0865be34c5bbf85ba64c1 (patch) | |
tree | 0926f55cc6e11e5c6f16227e85d9b9bc8bdba873 /activerecord/lib/active_record/connection_adapters/postgresql | |
parent | 933decceaf6092020ba7ba768b51b2db9d5b882f (diff) | |
download | rails-1502caefd30b137fd1a0865be34c5bbf85ba64c1.tar.gz rails-1502caefd30b137fd1a0865be34c5bbf85ba64c1.tar.bz2 rails-1502caefd30b137fd1a0865be34c5bbf85ba64c1.zip |
Allow `:precision` option for time type columns
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/postgresql')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb b/activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb index 81fde18f64..503dda60f4 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb @@ -534,13 +534,6 @@ module ActiveRecord when 5..8; 'bigint' else raise(ActiveRecordError, "No integer type has byte size #{limit}. Use a numeric with precision 0 instead.") end - when 'datetime' - return super unless precision - - case precision - when 0..6; "timestamp(#{precision})" - else raise(ActiveRecordError, "No timestamp type has precision of #{precision}. The allowed range of precision is from 0 to 6") - end else super end |