summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
Diffstat (limited to 'docs/ref')
-rw-r--r--docs/ref/models/database-functions.txt10
1 files changed, 9 insertions, 1 deletions
diff --git a/docs/ref/models/database-functions.txt b/docs/ref/models/database-functions.txt
index cf251a758d..fba7a53826 100644
--- a/docs/ref/models/database-functions.txt
+++ b/docs/ref/models/database-functions.txt
@@ -1901,7 +1901,7 @@ generated using a cryptographically secure method.
.. versionadded:: 6.1
-.. class:: UUID7()
+.. class:: UUID7(shift=None)
Generates a :rfc:`version 7 UUID <9562#section-5.7>`, which starts with a
time-based component.
@@ -1911,6 +1911,14 @@ time-based component.
Available on PostgreSQL version 18 or later, MariaDB version 11.7 or later,
and SQLite on Python version 3.14 or later.
+.. admonition:: ``shift``
+
+ On PostgreSQL, ``UUID7`` also supports an optional ``shift`` value, which
+ can be used to offset the timestamp of the generated UUID. This should be a
+ :class:`datetime.timedelta` or an expression with an ``output_field`` of
+ :class:`~django.db.models.DurationField`. A positive value will shift the
+ timestamp into the future and a negative value into the past.
+
Window functions
================