-
-
Notifications
You must be signed in to change notification settings - Fork 225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Commands don't support alembic -x options #32
Comments
You can use the |
I tried doing just as you said with the I found an implementation where instead of using this:
they used this ...
haven't tried it personally, but the way i see it, if i use their implementation, i'll probably break the old one, perhaps you have a better solution ?? |
The reason Flask-Migrate can use You can use this logic to make it work for both Flask-Migrate and native Alembic:
|
Thanks for the great help, although i had to add some more code up top to make it work especially the importing of environment variables, ultimately i end up with the following code (for those that might be interested):
the only flaw I can see here is with the importing of environment variable being executed twice when running inside the application context. |
You can move all that extra code that you added inside the |
Hi, the current upgrade and downgrade commands don't support -x option, which is quite important for things like one off database migrations.
How do I extend command to support this? I can submit a patch if you're able to point me i the right direction
Is there a workaround to directly use alembic commands?
Thanks.
The text was updated successfully, but these errors were encountered: