Skip to content

Commit 5479ee2

Browse files
committed
update docs
1 parent 8563e5b commit 5479ee2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/ecto/schema.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1596,7 +1596,7 @@ defmodule Ecto.Schema do
15961596
section for more info). Primary keys are automatically set up for embedded
15971597
schemas as well, defaulting to `{:id, :binary_id, autogenerate: true}`.
15981598
This will generate the default UUID v4. You can use UUID v7 instead by setting
1599-
the primary key to `{:id, :binary_id, autogenerate: {Ecto.UUID, :generate, [:v7]}}`
1599+
the primary key to `{:id, :binary_id, autogenerate: [version: 7]}`
16001600
Note `:primary_key`s are not automatically read back on `insert/2`,
16011601
unless one of `autogenerate: true` or `read_after_writes: true` is set.
16021602

lib/ecto/uuid.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ defmodule Ecto.UUID do
1414
To use UUID v7 (time-ordered) instead:
1515
1616
use Ecto.Schema
17-
@primary_key {:id, :binary_id, autogenerate: {Ecto.UUID, :generate, [:v7]}}
17+
@primary_key {:id, :binary_id, autogenerate: [version: 7]}
1818
"""
1919

2020
use Ecto.Type

0 commit comments

Comments
 (0)