Skip to content

refactor: update PrimaryKeyMixin to use postgres uuidv7 defaults#9

Open
mplemay wants to merge 1 commit intomainfrom
uuidb7
Open

refactor: update PrimaryKeyMixin to use postgres uuidv7 defaults#9
mplemay wants to merge 1 commit intomainfrom
uuidb7

Conversation

@mplemay
Copy link
Owner

@mplemay mplemay commented Feb 4, 2026

Summary

  • switch PrimaryKeyMixin.id to rely on uuidv7() for Postgres server defaults and generate UUID4s via a SQLite-only before-flush hook
  • strip uuidv7() from non-Postgres DDL and restore it afterward so SQLite migrations do not emit invalid defaults
  • refresh the docstring and tests to describe the new behavior and validate the generated UUID4 after flush

Testing

  • Not run (not requested)

@mplemay mplemay changed the title Update PrimaryKeyMixin to use Postgres uuidv7 defaults refactor: update PrimaryKeyMixin to use postgres uuidv7 defaults Feb 4, 2026
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.

1 participant