-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
table.tometadata() fails on index that was created on interim version of table #4279
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
Comments
Changes by Michael Bayer (@zzzeek):
|
Michael Bayer (@zzzeek) wrote: ok that is up at https://gerrit.sqlalchemy.org/#/q/I521aa2c9f3baa0e84598bbdd6ffe4bf07b6e3ba8. the gerrit queue is enormous right now, will take a few days for this to get in. |
colladoman wrote: Thank you! For me it would a be perfect workaround (and a simple and great new feature) doing something like that in tometadata method:
|
Michael Bayer (@zzzeek) wrote: fine grained control over tometadata() would be nice but if you make it "COPY_X=True" kind of thing, what about: unique constraints, primary key constraints, check constraints, Posgresql-specific EXCLUDES contraints, etc, then you have an API like:
dialects like Postgresql need to be able to inject new "mydialect_copy_myddl=True" options into it, so that would be **kw as well. I usually do exclusion APIs more like this:
include_object is a function that receives each object, it can then return True/False to indicate if that object should be included. metadata.reflect() has this as does the autogenerate system in Alembic. |
colladoman wrote: Yours is really a much better aproach, but i can't fully understand how it should be used. I would appreciate an example when it is implemented. |
Michael Bayer (@zzzeek) wrote: the bug is fixed, you use tometadata() like you were doing. |
Michael Bayer (@zzzeek) wrote: Lookup index columns in parent table by key for copy Fixed regression in 1.2 due to 🎫 Change-Id: I521aa2c9f3baa0e84598bbdd6ffe4bf07b6e3ba8 → 8f7766c |
Changes by Michael Bayer (@zzzeek):
|
Michael Bayer (@zzzeek) wrote: Lookup index columns in parent table by key for copy Fixed regression in 1.2 due to 🎫 Change-Id: I521aa2c9f3baa0e84598bbdd6ffe4bf07b6e3ba8 → b6f479b |
colladoman wrote: Awesome! Thanks! |
Migrated issue, originally created by Michael Bayer (@zzzeek)
This seems to be a regression in 1.2 due to #4147
output:
The text was updated successfully, but these errors were encountered: