Skip to content

feat(models): use UUIDv7 for AuditLog.id#18

Open
slint wants to merge 1 commit intoinveniosoftware:masterfrom
slint:partitioning
Open

feat(models): use UUIDv7 for AuditLog.id#18
slint wants to merge 1 commit intoinveniosoftware:masterfrom
slint:partitioning

Conversation

@slint
Copy link
Copy Markdown
Member

@slint slint commented Oct 10, 2025

This is in anticipation of testing the module for using PostgreSQL table partitioning.

With a UUIDv7 column, we could partition the table solely on the id column, without having to have a composite primary key to also use the existing created column (see also the pg_partman How-to guide).

from sqlalchemy_utils.types import UUIDType

try:
from uuid import uuid7
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this the official start of bringing in python3.14 features?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really, more of a forwards compatibility measure.

Though lots of folks are eager to go all the way to 3.14, given some recent performance comparisons 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants