File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -508,8 +508,16 @@ def _init_from_database(self) -> None:
508508 if category == "UUID" :
509509 attr ["uuid" ] = True
510510 elif category in CORE_TYPE_NAMES :
511- # Core type alias - already resolved in DB
512- pass
511+ # Core type alias - already resolved in DB.
512+ # MariaDB-specific recovery: MariaDB stores `json` columns
513+ # as `longtext` and reports them back that way through
514+ # information_schema, so the DB-type-based detection above
515+ # leaves attr["json"] False. The :json: comment marker
516+ # survives this aliasing, so we recover the json flag here
517+ # from the original declared type. No-op on MySQL/PostgreSQL
518+ # (attr["json"] is already True from the regex match above).
519+ if category == "JSON" :
520+ attr ["json" ] = True
513521
514522 # Check primary key constraints
515523 if attr ["in_key" ] and (attr ["is_blob" ] or attr ["json" ]):
You can’t perform that action at this time.
0 commit comments