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:
parent
c9a43126c5
commit
1a69112d6a
1 changed files with 1 additions and 0 deletions
|
@ -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.
|
* `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.
|
* `polymorphic` Adds a `type` column for `belongs_to` associations.
|
||||||
* `null` Allows or disallows `NULL` values in the column.
|
* `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:
|
For instance, running:
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue