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

Update migrations.md

default column type modifier
This commit is contained in:
Kalman Hazins 2014-06-08 10:29:57 -04:00
parent c9a43126c5
commit 1a69112d6a

View file

@ -303,6 +303,7 @@ braces. You can use the following modifiers:
* `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.
* `default` Allows to set a default value on the column. NOTE: If using a dynamic value (such as date), the default will only be calculated the first time (e.g. on the date the migration is applied.)
For instance, running: