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
How to work with alembic? #374
Comments
Ah right, will add in FAQ. Thanks for the report!
from widgets.models import db as target_metadata You can see this in a very outdated example here. |
Awesome, it works. |
For future reference, Here's a gist that you might find helpful: https://gist.github.com/omarryhan/cb7bf6d7142c154496ba6623a56326c2 |
@Ovyerus I don't know the context of the code you attached. Alembic doesn't support Python's async way, and Gino will only provide metadata or db schema that Alembic can use to infer the migration. |
Alembic |
You can always use |
Ah, good to know 👍 |
Hey, I recently came across this situation. I am able to use alembic with gino and handle some basic migrations, but I really don't like the interaction between the two by different reasons:
Do you have a plan to deal with any of the issues I am seeing? Best, |
@jorgeecardona Thanks for pointing it out! I'm well aware of this issue. As I checked out code in Alembic, it currently can't support Python's async style. |
Closing this one as we have an example now. |
@fantix Can I use this without Poetry? How do I run the load_modules() function without it? What goes in the |
@austincollinpena please also see this how-to by @xnuinside in #672 |
Tutorial mentions following:
What I Did
I followed Alembic docs about Auto Generating Migrations and it tells to do:
I imported my model class - got error about missing attribute. Same when I did it for base
db.Model
:Documentation needs some section about where to get that metadata for alembic to autogenerate migrations.
The text was updated successfully, but these errors were encountered: