admin管理员组文章数量:1403522
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
本文标签: pythonHandling PostgreSQL ENUM types in SQLAlchemy and Alembic migrationsStack Overflow
版权声明:本文标题:python - Handling PostgreSQL ENUM types in SQLAlchemy and Alembic migrations - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744347974a2601878.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论