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
Doesn't import custom column types like ArrowType from the right place #229
Comments
Changes by nickretallack (@nickretallack):
|
Michael Bayer (@zzzeek) wrote: see http://alembic.readthedocs.org/en/latest/tutorial.html#autogen-module-prefix , reopen if you still have issues, thanks |
Michael Bayer (@zzzeek) wrote: existing feature |
Changes by Michael Bayer (@zzzeek):
|
nickretallack (@nickretallack) wrote: Why can't it just figure out where to import the type from by checking |
nickretallack (@nickretallack) wrote: Ok I tried editing my env.py and putting in the user_module_prefix but it didn't change anything. But even if it did, I'm using several custom types from different modules, so how would it work for all of them? This seems pretty shitty :P |
nickretallack (@nickretallack) wrote: This could be better. Also, it doesn't work for me. |
Changes by nickretallack (@nickretallack):
|
Michael Bayer (@zzzeek) wrote: you'd need to provide a single module where all your custom types can be imported from. as for "doesn't work" I don't really know what to say, you're saying new autogen file and it spits out the "sa" prefix anyway ? can i have some specifics please ? |
Michael Bayer (@zzzeek) wrote: also, I'm an older person, sorry if this is normal for younger folks these days but calling my code "pretty shitty" is not a great way to inspire me to care about changing it for you. |
Michael Bayer (@zzzeek) wrote: works for me. make a blank alembic environment, use this env.py:
command:
output migration:
|
Michael Bayer (@zzzeek) wrote: the reason you want a fixed module for types and not guessing with |
Michael Bayer (@zzzeek) wrote: that said, with the advent of 0.7 and some backwards incompatibility is OK, |
Michael Bayer (@zzzeek) wrote:
The default value of the fixes #229 → 44d5eea |
Changes by Michael Bayer (@zzzeek):
|
Migrated issue, originally created by nickretallack (@nickretallack)
I wrote a simple model in Flask-SQLAlchemy like this:
Then I generated the migration using Flask-Migrate, which uses Alembic internally, and it generated this:
Of course, ArrowType is not part of sqlalchemy, so I edited it to import it from the right place. It'd be cool if it got the import correct
The text was updated successfully, but these errors were encountered: