Remove unsigned integer types from core types for DataJoint 2.0#128
Merged
MilagrosMarin merged 3 commits intomainfrom Jan 19, 2026
Merged
Remove unsigned integer types from core types for DataJoint 2.0#128MilagrosMarin merged 3 commits intomainfrom
MilagrosMarin merged 3 commits intomainfrom
Conversation
Remove uint8, uint16, uint32, and uint64 from the core type specification. These types are MySQL-specific and not portable to PostgreSQL. Changes: - Remove unsigned types from core numeric types table - Update native type conversion recommendations (use larger signed types) - Update UNSIGNED modifier status to "Discouraged" - Update architecture overview examples Users can still use unsigned types as native types (with warnings), but they are no longer part of DataJoint's portable core type system. Matches implementation changes in datajoint-python pre/v2.0.
Replace all uint8, uint16, uint32, uint64 with signed equivalents: - uint8 → int16 (promoted to larger signed type) - uint16 → int32 (promoted to larger signed type) - uint32 → int64 (promoted to larger signed type) - uint64 → int64 Unsigned integers are no longer core types in DataJoint 2.0. Native unsigned types (e.g., 'int unsigned') are still allowed as MySQL-specific pass-through types but discouraged. Updated files: - All tutorials (basics, advanced, examples, domain) - All how-to guides - All explanations - All reference specs - Type system spec
Executed 19 notebooks and saved outputs after removing unsigned types: How-To: - model-relationships.ipynb - read-diagrams.ipynb Basic Tutorials: - 01-first-pipeline.ipynb - 02-schema-design.ipynb - 03-data-entry.ipynb - 04-queries.ipynb - 05-computation.ipynb Advanced Tutorials: - custom-codecs.ipynb - distributed.ipynb - json-type.ipynb - sql-comparison.ipynb Domain Tutorials: - allen-ccf.ipynb - calcium-imaging.ipynb - electrophysiology.ipynb Example Tutorials: - blob-detection.ipynb - fractal-pipeline.ipynb - hotel-reservations.ipynb - languages.ipynb - university.ipynb Skipped (require object store config): - 06-object-storage.ipynb - ephys-with-npy.ipynb All executed notebooks validate that uint → int type replacements work correctly with current DataJoint 2.0 implementation.
MilagrosMarin
approved these changes
Jan 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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