Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions lib/ecto/migration.ex
Original file line number Diff line number Diff line change
Expand Up @@ -1283,8 +1283,8 @@ defmodule Ecto.Migration do
@doc """
Adds `:inserted_at` and `:updated_at` timestamp columns.

Those columns are of `:naive_datetime` type and by default cannot be null. A
list of `opts` can be given to customize the generated fields.
Those columns are of `:naive_datetime` type. A list of `opts` can be given
to customize the generated fields.

Following options will override the repo configuration specified by
`:migration_timestamps` option.
Expand All @@ -1300,6 +1300,8 @@ defmodule Ecto.Migration do
* `:default` - the columns' default value. It can be a string, number, empty
list, list of strings, list of numbers, or a fragment generated by
`fragment/1`.
* `:null` - determines whether the column accepts null values. Defaults to
`false`.

"""
def timestamps(opts \\ []) when is_list(opts) do
Expand Down
Loading