Migrate User Model ID from UUID to Integer #219
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR replaces the
UUIDprimary key in theUsermodel with an auto-incrementingIntegerID. This change ensures consistency across the application, as most models and APIs rely on integer-based identifiers.Target issue is #108
Key Changes
user.idfromUUIDtoINTusing a dedicated mapping table (uuid_to_int_map) to preserve referential integrity.user.idin related tables (document,collection,projectuser,apikey) from UUID to INT.user_id_seqsequence to support auto-increment behavior foruser.id.Affected Areas
Usermodel’s ID type.Checklist
Before submitting a pull request, please ensure that you mark these task.
fastapi run --reload app/main.pyordocker compose upin the repository root and test.Notes
Please add here if any other information is required for the reviewer.