Skip to content

Commit a4cb762

Browse files
update migration 'timestamps/1' docs to include ':null' option (#669)
1 parent 6130b05 commit a4cb762

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/ecto/migration.ex

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1283,8 +1283,8 @@ defmodule Ecto.Migration do
12831283
@doc """
12841284
Adds `:inserted_at` and `:updated_at` timestamp columns.
12851285
1286-
Those columns are of `:naive_datetime` type and by default cannot be null. A
1287-
list of `opts` can be given to customize the generated fields.
1286+
Those columns are of `:naive_datetime` type. A list of `opts` can be given
1287+
to customize the generated fields.
12881288
12891289
Following options will override the repo configuration specified by
12901290
`:migration_timestamps` option.
@@ -1300,6 +1300,8 @@ defmodule Ecto.Migration do
13001300
* `:default` - the columns' default value. It can be a string, number, empty
13011301
list, list of strings, list of numbers, or a fragment generated by
13021302
`fragment/1`.
1303+
* `:null` - determines whether the column accepts null values. Defaults to
1304+
`false`.
13031305
13041306
"""
13051307
def timestamps(opts \\ []) when is_list(opts) do

0 commit comments

Comments
 (0)