Skip to content

Commit 8de3714

Browse files
fix: reduce MAX_TABLE_NAME_LENGTH from 64 to 63
PostgreSQL's limit is 63 (NAMEDATALEN-1). MySQL allows 64 but 63 is safe for both. Prevents silent truncation on PostgreSQL. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent fd62c02 commit 8de3714

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/datajoint/declare.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
# Get SQL mapping for core types
5353
CORE_TYPE_SQL = {name: sql_type for name, (_, sql_type) in CORE_TYPES.items()}
5454

55-
MAX_TABLE_NAME_LENGTH = 64
55+
MAX_TABLE_NAME_LENGTH = 63 # PostgreSQL NAMEDATALEN-1; MySQL allows 64 but 63 is safe for both
5656
CONSTANT_LITERALS = {
5757
"CURRENT_TIMESTAMP",
5858
"NULL",

0 commit comments

Comments
 (0)