Skip to content

Commit

Permalink
Add migration default :null option (#403)
Browse files Browse the repository at this point in the history
  • Loading branch information
dcdourado authored May 12, 2022
1 parent 108d01b commit d53cf7e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/ecto/migration.ex
Original file line number Diff line number Diff line change
Expand Up @@ -931,7 +931,9 @@ defmodule Ecto.Migration do
* `:default` - the column's default value. It can be a string, number, empty
list, list of strings, list of numbers, or a fragment generated by
`fragment/1`.
* `:null` - when `false`, the column does not allow null values.
* `:null` - determines whether the column accepts null values. When not specified,
the database will use its default behaviour (which is to treat the column as nullable
in most databases).
* `:size` - the size of the type (for example, the number of characters).
The default is no size, except for `:string`, which defaults to `255`.
* `:precision` - the precision for a numeric type. Required when `:scale` is
Expand Down Expand Up @@ -1080,7 +1082,8 @@ defmodule Ecto.Migration do
## Options
* `:null` - determines whether the column accepts null values.
* `:null` - determines whether the column accepts null values. If this option is
not set, the nullable behaviour of the underlying column is not modified.
* `:default` - changes the default value of the column.
* `:from` - specifies the current type and options of the column.
* `:size` - specifies the size of the type (for example, the number of characters).
Expand Down

0 comments on commit d53cf7e

Please sign in to comment.