diff options
author | Hongli Lai (Phusion) <hongli@phusion.nl> | 2008-09-13 12:54:45 +0200 |
---|---|---|
committer | Hongli Lai (Phusion) <hongli@phusion.nl> | 2008-09-13 12:54:45 +0200 |
commit | 143fbbddbbce84f44434c58828e2a537553e69ea (patch) | |
tree | 44caca83e69695e5e5ae0189eaa1f7d6ae129183 | |
parent | b810349c8dbc8d27602181832466bb2a518191a0 (diff) | |
download | rails-143fbbddbbce84f44434c58828e2a537553e69ea.tar.gz rails-143fbbddbbce84f44434c58828e2a537553e69ea.tar.bz2 rails-143fbbddbbce84f44434c58828e2a537553e69ea.zip |
Clarify decimal precision and scale options.
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb b/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb index b764f26ec8..bcb975e8e1 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb @@ -341,6 +341,12 @@ module ActiveRecord # * <tt>:scale</tt> - # Specifies the scale for a <tt>:decimal</tt> column. # + # For clarity's sake: the precision is the number of significant digits, + # while the scale is the number of digits that can be stored following + # the decimal point. For example, the number 123.45 has a precision of 5 + # and a scale of 2. A decimal with a precision of 5 and a scale of 2 can + # range from -999.99 to 999.99. + # # Please be aware of different RDBMS implementations behavior with # <tt>:decimal</tt> columns: # * The SQL standard says the default scale should be 0, <tt>:scale</tt> <= |