1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge pull request #13357 from taryneast/master

Describe precision + scale in migrations guide
This commit is contained in:
Lauro Caetano 2013-12-19 14:51:39 -08:00
commit 6de454fb05

View file

@ -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: