Permalink
Browse files

[ci skip] Describe precision + scale in migrations

Telling somebody that "precision sets the precision" is not very helpful.
Newbies want to know what precision is *for*, likewise with scale.

So I've added a very brief description for each.
  • Loading branch information...
1 parent f706d5f commit e2c17cfb2b57a8543976e478a63f62c880c224ad @taryneast taryneast committed Dec 18, 2013
Showing with 4 additions and 4 deletions.
  1. +4 −4 guides/source/migrations.md
@@ -297,10 +297,10 @@ You can append as many column name/type pairs as you want.
You can also specify some options just after the field type between curly
braces. You can use the following modifiers:
-* `limit` Sets the maximum size of the `string/text/binary/integer` fields
-* `precision` Defines the precision for the `decimal` fields
-* `scale` Defines the scale for the `decimal` fields
-* `polymorphic` Adds a `type` column for `belongs_to` associations
+* `limit` Sets the maximum size of the `string/text/binary/integer` fields.
+* `precision` Defines the precision for the `decimal` fields, representing the total number of digits in the number.
+* `scale` Defines the scale for the `decimal` fields, representing the number of digits after the decimal point.
+* `polymorphic` Adds a `type` column for `belongs_to` associations.
* `null` Allows or disallows `NULL` values in the column.
For instance, running:

0 comments on commit e2c17cf

Please sign in to comment.