Remove unsigned integer types from core types for DataJoint 2.0 #128
+2,740
−2,360
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.
Overview
This PR updates all DataJoint documentation to remove unsigned integer types (uint8, uint16, uint32, uint64) from the core type system, aligning with DataJoint 2.0.0a22 which removed these types for better PostgreSQL compatibility.
Related: datajoint/datajoint-python#1335
Changes
1. Type System Updates (48 files total)
Type Replacements:
uint8→int16(promoted to larger signed type)uint16→int32(promoted to larger signed type)uint32→int64(promoted to larger signed type)uint64→int64Updated Documentation:
2. Notebook Execution (19 notebooks)
Executed notebooks with updated type system to validate changes:
How-To (2):
Basic Tutorials (5):
Advanced Tutorials (4):
Domain Tutorials (3):
Example Tutorials (5):
Skipped (require object store setup):
Rationale
Why Remove Unsigned Types?
What About Native Unsigned Types?
Native MySQL types like
int unsignedare still allowed as pass-through types but are:Example:
Migration Guide
For Existing Pipelines
Option 1: Use larger signed types (recommended)
Option 2: Use native MySQL types (not recommended)
Type Promotion Strategy
The documentation uses conservative promotion to avoid overflow:
uint8→int16(doubles range)uint16→int32(doubles range)uint32→int64(doubles range)uint64→int64(may lose upper range, but uint64 values >2^63 are rare in practice)Testing
Documentation Impact
Files Modified:
Backward Compatibility
Breaking Change: Yes, for pipelines using uint8, uint16, uint32, uint64
Mitigation:
Checklist
Preview
Documentation preview will be available once PR is merged. Key pages to review:
Version: Targets DataJoint 2.0.0a22+
Branch:
pre/v2.0→mainRelated Issues: datajoint/datajoint-python#1335