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
Incorrect handling of complex indexes by Table.tometadata #4147
Comments
Changes by Michael Bayer (@zzzeek):
|
Michael Bayer (@zzzeek) wrote: well also that test should be improved to maintain func() and all that:
|
Michael Bayer (@zzzeek) wrote: that test case is perfect, covers several bases at once, thanks so much! |
Michael Bayer (@zzzeek) wrote: Fully copy index expressions Fixed bug where the :meth: Also refined the means by which tometadata() checks if an Index Change-Id: I7ef1b8ea42f9933357ae35f241a5ba9838bac35b → 31dd482 |
Changes by Michael Bayer (@zzzeek):
|
colladoman wrote: I'm having lots of problems when I try to use "tometadata" in tables from Oracle that contain indexes. I've been using this to sync data from one database to other, but since sqlalchemy 1.2.0 i'm having this problem:
I've tested that reverting the last part of tometadata method changes everything runs fine again (file sqlalchemy/sql/schema.py):
to (1.1.8)
Actually, I don't need indexes to be copied, but I would like to know if there's something I can do to get tables copied from one database to another like I used to |
Michael Bayer (@zzzeek) wrote: @colladoman best way is for you to provide the oracle CREATE TABLE /CREATE INDEX statements that produces these constructs in a minimal way to reproduce the issue, and then I will fix it. without a test case I can't fix. |
colladoman wrote: Here it is: Creation of table and index in Oracle:
And here is a sample source code:
This is the result in 1.2.8:
In 1.1.18, it runs perfectly. |
Migrated issue, originally created by Paweł Stiasny
Current implementation Table.tometada doesn't correctly support functional and text indexes.
Consider the following test:
text
expression index is ignoredfunc
is improperly classified as the default index of a column and ignoredmulti-func
the second component is incorrect (should be a Function, is a Column)The text was updated successfully, but these errors were encountered: