Skip to content

Conversation

@QuantumGhost
Copy link
Collaborator

Summary

This PR introduces UUIDv7 implementations in both Python and SQL to establish the foundation for migrating from UUIDv4 to UUIDv7 as proposed in #19754.

ID generation algorithm of existing models are not changed, and new models should use UUIDv7 for ID generation.

Close #19754.

Screenshots

N/A

Checklist

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods

@QuantumGhost QuantumGhost requested a review from laipz8200 July 8, 2025 16:09
@QuantumGhost QuantumGhost force-pushed the feat/uuidv7 branch 3 times, most recently from be04ffa to 887c372 Compare July 8, 2025 16:32
@QuantumGhost QuantumGhost marked this pull request as ready for review July 8, 2025 16:33
@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. 🐍Python 💪 enhancement New feature or request labels Jul 8, 2025
laipz8200
laipz8200 previously approved these changes Jul 9, 2025
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jul 9, 2025
Add native Python implementation of UUIDv7 generation algorithm with
comprehensive test coverage for time-ordered UUID generation.
@QuantumGhost QuantumGhost merged commit ddfd8c8 into langgenius:main Jul 16, 2025
7 checks passed
douxc pushed a commit that referenced this pull request Jul 16, 2025
This PR introduces UUIDv7 implementations in both Python and SQL to establish the foundation for migrating from UUIDv4 to UUIDv7 as proposed in #19754.

ID generation algorithm of existing models are not changed, and new models should use UUIDv7 for ID generation.

Close #19754.
tutkun pushed a commit to tutkun/dify that referenced this pull request Aug 15, 2025
)

This PR introduces UUIDv7 implementations in both Python and SQL to establish the foundation for migrating from UUIDv4 to UUIDv7 as proposed in langgenius#19754.

ID generation algorithm of existing models are not changed, and new models should use UUIDv7 for ID generation.

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

Labels

💪 enhancement New feature or request lgtm This PR has been approved by a maintainer size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Proposal: Use UUIDv7 Algorithm for Primary Keys in New Models

2 participants