Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions src/datajoint/heading.py
Original file line number Diff line number Diff line change
Expand Up @@ -508,8 +508,16 @@ def _init_from_database(self) -> None:
if category == "UUID":
attr["uuid"] = True
elif category in CORE_TYPE_NAMES:
# Core type alias - already resolved in DB
pass
# Core type alias - already resolved in DB.
# MariaDB-specific recovery: MariaDB stores `json` columns
# as `longtext` and reports them back that way through
# information_schema, so the DB-type-based detection above
# leaves attr["json"] False. The :json: comment marker
# survives this aliasing, so we recover the json flag here
# from the original declared type. No-op on MySQL/PostgreSQL
# (attr["json"] is already True from the regex match above).
if category == "JSON":
attr["json"] = True

# Check primary key constraints
if attr["in_key"] and (attr["is_blob"] or attr["json"]):
Expand Down
Loading