AbstractType not longer exists in the class hierarchy for types.
TypeEngine was its direct descendant, so use that instead.
Change-Id: Idbfaee4b0d3acbc4795913ddf2ab4e1c9b6d065c
In SQLA 0.9 there is now a native .quote attribute on many objects.
Conditionally use this instead of the old method if the attribute
exists, to remove deprecation messages (and prepare for when the
other way will be fully removed).
Change-Id: I3c5fada13e044c1c4102acc0455226ce1524f2e2
Since ibm_db_sa is not part of sqlalchemy, we need to handle the
conditional import of the module in visitor.py so we don't get an
ImportError if ibm_db_sa is not available.
Closes-Bug: #1287229
Change-Id: Ida070b629ce3b9be727ae49973bb6a71543c1dcf
This patch fixes get_constraint_name in the
ANSIConstraintCommon class. It's part of the
fixes needed for SQLA 0.9.x compat.
Change-Id: I1f1648af48f459bd18f99bb42fa9a272186fb37d
Remove all trailing spaces and tabs in every file in the project.
People have editors configured to do this, which causes them to
accidentally make little whitespace changes in unrelated commits,
which makes those commits harder to review. Better to fix them all
at once.
Change-Id: I17d89f55f41d8599e0ab1a31f646cd161289703e
This patch adds the initial support for DB2 10.5 to migrate. It
includes:
1. The dialect implementation for DB2.
2. The dialect registration with the visitor.
3. Code to parse the engine name in version.py.
4. A new dependency on ibm_db_sa in test-requirements.txt.
5. A connection string in test_db.cfg for ibm_db_sa.
Part of blueprint add-db2-support
Co-authored-by: Sheng Bo Hou <sbhou@cn.ibm.com>
Co-authored-by: Thuy Christenson <thuy@us.ibm.com>
Co-authored-by: Rahul Priyadarshi <rahul.priyadarshi@in.ibm.com>
Change-Id: I745ec615487b1b06c5d1a09ea316f376d66ee4c0
Version 0.8 of SQLAlchemy added support of indexes
on expressions in addition to plain table columns,
which changed the way indexes are created.
This broke support of dropping columns of composite
indexes for SQLite: due to limitations of ALTER in
SQLite every time a column is dropped, we recreate
the whole table without the given column; if a
column is a part of a composite index, we change the
index definition to omit that column and then indexes
are recreated too.
SQLAlchemy versions starting from 0.8 no more pay
attention to 'columns' attribute of Index instances
when generating DDL for indexes, so when one of columns
of a composite index is dropped, we try to create a
new index on the column that doesn't exist anymore,
which of course fails.
Closes-Bug: #1241038
Change-Id: I777b8ce36e36f49bfb0889908811a063cf1a527b
In commit 0.7.2-16-gc670d1d the _index_identifier() implementation
was copied from sqlalchemy, as that function was renamed
in sqlalchemy 0.8. Instead handle call the renamed function
when appropriate, to decouple ourselves from the sqlalchemy
implementation.
Change-Id: I97b22c20d96758fc5b6bd55318218edb26c5b5d0