I'm trying to implement PostgreSQL ENUM types properly in my SQLAlchemy models and Alembic migrations. I am stuck on this one specific part:
How do I handle creating the enum type in migrations before it's used in tables?
I want to keep SQL Alchemy as a single source of truth, so adding in ad-hoc migrations to fill in the gaps from SQL Alchemy definitions makes it very hard to maintain what the current schema is by looking at the code alone.
Thanks in advance