[Django] #36735: Add UUID4 and UUID7 database functions

12 views
Skip to first unread message

Django

unread,
Nov 15, 2025, 12:19:22 PM11/15/25
to django-...@googlegroups.com
#36735: Add UUID4 and UUID7 database functions
-------------------------------------+-------------------------------------
Reporter: Lily | Type: New
| feature
Status: new | Component: Database
| layer (models, ORM)
Version: dev | Severity: Normal
Keywords: uuid | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
As discussed in https://github.com/django/new-features/issues/85, multiple
databases (postgres, mariadb, oracle) have support for generating uuid4
and uuid7 values and it seems likely that other databases will follow.
They are also popular choices for database primary keys, and together with
`db_default` this will make it easy to use from Django.

django.contrib.postgres also has a `RandomUUID` function which supports
uuid4. This can be deprecated and removed.
--
Ticket URL: <https://code.djangoproject.com/ticket/36735>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Nov 15, 2025, 12:35:00 PM11/15/25
to django-...@googlegroups.com
#36735: Add UUID4 and UUID7 database functions
-------------------------------------+-------------------------------------
Reporter: Lily | Owner: Lily
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: uuid | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Lily):

* owner: (none) => Lily
* status: new => assigned

--
Ticket URL: <https://code.djangoproject.com/ticket/36735#comment:1>

Django

unread,
Nov 17, 2025, 7:49:29 AM11/17/25
to django-...@googlegroups.com
#36735: Add UUID4 and UUID7 database functions
-------------------------------------+-------------------------------------
Reporter: Lily | Owner: Lily
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: uuid | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Jacob Walls):

* stage: Unreviewed => Accepted

--
Ticket URL: <https://code.djangoproject.com/ticket/36735#comment:2>

Django

unread,
Nov 17, 2025, 7:57:45 AM11/17/25
to django-...@googlegroups.com
#36735: Add UUID4 and UUID7 database functions
-------------------------------------+-------------------------------------
Reporter: Lily | Owner: Lily
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: uuid | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Paolo Melchiorre):

* cc: Paolo Melchiorre (added)

--
Ticket URL: <https://code.djangoproject.com/ticket/36735#comment:3>

Django

unread,
Nov 19, 2025, 12:11:15 PM11/19/25
to django-...@googlegroups.com
#36735: Add UUID4 and UUID7 database functions
-------------------------------------+-------------------------------------
Reporter: Lily | Owner: Lily
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: uuid | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Lily):

* has_patch: 0 => 1

--
Ticket URL: <https://code.djangoproject.com/ticket/36735#comment:4>

Django

unread,
Dec 10, 2025, 4:09:16 PM12/10/25
to django-...@googlegroups.com
#36735: Add UUID4 and UUID7 database functions
-------------------------------------+-------------------------------------
Reporter: Lily | Owner: Lily
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: uuid | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Jacob Walls):

* needs_better_patch: 0 => 1

--
Ticket URL: <https://code.djangoproject.com/ticket/36735#comment:5>

Django

unread,
Dec 10, 2025, 5:16:49 PM12/10/25
to django-...@googlegroups.com
#36735: Add UUID4 and UUID7 database functions
-------------------------------------+-------------------------------------
Reporter: Lily | Owner: Lily
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: uuid | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Lily):

* needs_better_patch: 1 => 0

--
Ticket URL: <https://code.djangoproject.com/ticket/36735#comment:6>

Django

unread,
Dec 10, 2025, 5:33:28 PM12/10/25
to django-...@googlegroups.com
#36735: Add UUID4 and UUID7 database functions
-------------------------------------+-------------------------------------
Reporter: Lily | Owner: Lily
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: uuid | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Jacob Walls):

* stage: Accepted => Ready for checkin

--
Ticket URL: <https://code.djangoproject.com/ticket/36735#comment:7>

Django

unread,
Dec 12, 2025, 11:17:19 AM12/12/25
to django-...@googlegroups.com
#36735: Add UUID4 and UUID7 database functions
-------------------------------------+-------------------------------------
Reporter: Lily | Owner: Lily
Type: New feature | Status: closed
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution: fixed
Keywords: uuid | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Jacob Walls <jacobtylerwalls@…>):

* resolution: => fixed
* status: assigned => closed

Comment:

In [changeset:"accceec9493d08e19d59fa1a59f69c0fdf23bb13" accceec]:
{{{#!CommitTicketReference repository=""
revision="accceec9493d08e19d59fa1a59f69c0fdf23bb13"
Fixed #36735 -- Added UUID4 and UUID7 database functions.

Co-authored-by: Mariusz Felisiak <felisiak...@gmail.com>
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/36735#comment:8>

Django

unread,
Dec 12, 2025, 11:50:48 AM12/12/25
to django-...@googlegroups.com
#36735: Add UUID4 and UUID7 database functions
-------------------------------------+-------------------------------------
Reporter: Lily | Owner: Lily
Type: New feature | Status: closed
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution: fixed
Keywords: uuid | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Jacob Walls <jacobtylerwalls@…>):

In [changeset:"e95468ed97b1c250939da316218c39dad577ba32" e95468ed]:
{{{#!CommitTicketReference repository=""
revision="e95468ed97b1c250939da316218c39dad577ba32"
Refs #36735 -- Supported shift parameter for UUID7 on PostgreSQL.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/36735#comment:9>
Reply all
Reply to author
Forward
0 new messages