You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SAWarning "Could not parse type name 'USER-DEFINED'" when reflecting CockroachDB enum #303
Reflecting a CockroachDB user-defined enum column triggers a noisy SAWarning and prevents Alembic autogenerate from determining the DB type for the column.
Run commands: alembic revision -m init --autogenerate alembic upgrade head alembic check
Expected
Reflection returns usable SQLAlchemy type metadata for my_model.my_enum (Enum or equivalent) with no SAWarning.
Alembic autogenerate does not log "Couldn't determine database type..." for that column.
Actual
.venv\Lib\site-packages\sqlalchemy_cockroachdb\base.py:232: SAWarning: Could not parse type name 'USER-DEFINED'
warn("Could not parse type name '%s'" % type_str)
INFO Couldn't determine database type for column 'my_model.my_enum'
Autogenerate emits no meaningful change for the column and is noisy.
Versions
sqlalchemy-cockroachdb == 2.0.4
SQLAlchemy == 2.0.49
sqlmodel == 0.0.38
asyncpg == 0.31.0
Python == 3.14.4
Alembic == 1.17.2 (also observed on 1.18.3)
Relevant code path
sqlalchemy_cockroachdb/base.py — parser that attempts to map Cockroach-reported type strings and calls warn("Could not parse type name '%s'").
Activity
gordthompson commentedon May 3, 2026
Hi @NotJustPizza . Thanks for reporting.
Can you please try your repro after doing
NotJustPizza commentedon May 5, 2026
Hi @gordthompson, sorry for late response! It works with your branch.
Thanks for quick fix! I'm looking forward to next release then :)
gordthompson commentedon May 5, 2026
Will be fixed by #298
re-work get_multi_columns (#298)