diff --git a/lib/ecto/migration.ex b/lib/ecto/migration.ex index 92f44240..22d29ab6 100644 --- a/lib/ecto/migration.ex +++ b/lib/ecto/migration.ex @@ -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. @@ -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