Commit d38a670
refactor: remove text from core types, keep as native passthrough (#1318)
`text` is no longer a core DataJoint type. It remains available as a
native SQL passthrough type (with portability warning).
Rationale:
- Core types should encourage structured, bounded data
- varchar(n) covers most legitimate text needs with explicit bounds
- json handles structured text better
- <object> is better for large/unbounded text (files, sequences, docs)
- text behavior varies across databases, hurting portability
Changes:
- Remove `text` from CORE_TYPES in declare.py
- Update NATIVE_TEXT pattern to match plain `text` (in addition to
tinytext, mediumtext, longtext)
- Update archive docs to note text is native-only
Users who need unlimited text can:
- Use varchar(n) with generous limit
- Use json for structured content
- Use <object> for large text files
- Use native text types with portability warning
Co-authored-by: Claude Opus 4.5 <[email protected]>1 parent 5f2847c commit d38a670
File tree
3 files changed
+7
-5
lines changed- docs/src/archive/design/tables
- src/datajoint
3 files changed
+7
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | 37 | | |
39 | 38 | | |
40 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
41 | 43 | | |
42 | 44 | | |
43 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
79 | 81 | | |
80 | 82 | | |
81 | 83 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
49 | | - | |
50 | 48 | | |
51 | 49 | | |
52 | 50 | | |
| |||
78 | 76 | | |
79 | 77 | | |
80 | 78 | | |
81 | | - | |
| 79 | + | |
82 | 80 | | |
83 | 81 | | |
84 | 82 | | |
| |||
0 commit comments