diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-02-12 15:12:27 -0200 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-02-12 15:12:27 -0200 |
commit | 68ce508e180eaed9539d2bea102861f9a56f50e6 (patch) | |
tree | cd170130c02a62c043efe97d407a2092ba4e308b /activerecord/lib/active_record/connection_adapters/postgresql | |
parent | 6eaadd9fc194b3a594b6aea7fb8f91a4a06ce1aa (diff) | |
parent | 1502caefd30b137fd1a0865be34c5bbf85ba64c1 (diff) | |
download | rails-68ce508e180eaed9539d2bea102861f9a56f50e6.tar.gz rails-68ce508e180eaed9539d2bea102861f9a56f50e6.tar.bz2 rails-68ce508e180eaed9539d2bea102861f9a56f50e6.zip |
Merge pull request #18886 from kamipo/allow_precision_option_for_time_column
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 |