diff options
author | Taryn East <git@taryneast.org> | 2013-12-18 11:48:37 +1100 |
---|---|---|
committer | Taryn East <git@taryneast.org> | 2013-12-20 08:55:13 +1100 |
commit | e2c17cfb2b57a8543976e478a63f62c880c224ad (patch) | |
tree | a35a2ec6cc3ae1d61b869f483a03ce9b9bb1e180 /guides/source | |
parent | f706d5f945c5751072bb90d080aff154e6858435 (diff) | |
download | rails-e2c17cfb2b57a8543976e478a63f62c880c224ad.tar.gz rails-e2c17cfb2b57a8543976e478a63f62c880c224ad.tar.bz2 rails-e2c17cfb2b57a8543976e478a63f62c880c224ad.zip |
[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.
Diffstat (limited to 'guides/source')
-rw-r--r-- | guides/source/migrations.md | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/guides/source/migrations.md b/guides/source/migrations.md index 71a177bca7..5d5c2724b1 100644 --- a/guides/source/migrations.md +++ b/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: |