File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff 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: [version: 7]}`
1599+ the primary key to `{:id, Ecto.UUID , 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
Original file line number Diff line number Diff line change @@ -14,12 +14,12 @@ defmodule Ecto.UUID do
1414 To use UUID v7 (time-ordered) instead:
1515
1616 use Ecto.Schema
17- @primary_key {:id, :binary_id , autogenerate: [version: 7]}
17+ @primary_key {:id, Ecto.UUID , autogenerate: [version: 7]}
1818
1919 To use UUID v7 (time-ordered) monotonic:
2020
2121 use Ecto.Schema
22- @primary_key {:id, :binary_id , autogenerate: [version: 7, monotonic: true]}
22+ @primary_key {:id, Ecto.UUID , autogenerate: [version: 7, monotonic: true]}
2323
2424 According to [RFC 9562](https://www.rfc-editor.org/rfc/rfc9562#name-monotonicity-and-counters):
2525 "Monotonicity (each subsequent value being greater than the last) is the
You can’t perform that action at this time.
0 commit comments