ItsDrike / code-jam-2024

Python Discord's Code Jam 2024, Contemplative Constellations Team
MIT License
1 stars 1 forks source link

Fix alembic auto-migrations #62

Closed ItsDrike closed 3 months ago

ItsDrike commented 3 months ago

Closes #61

The issue here was that Alembic didn't patch an operations instance, which meant the operations in from alembic import op weren't able to run successfully. (Alembic does this weird thing where the operations are all added to the globals dynamically with a Operations instance being proxied by patching it first, it's really weird and complex...)

Such small change, yet so annoying to figure out

(The reason i didn't catch this in #35 is because I only tested it with empty migration files that didn't actually do anything.)

Paillat-dev commented 3 months ago

Lgtm from GitHub mobile