summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Fix ibmdb2 unique constraint handling for sqlalchemy 0.9"HEADmasterJenkins2014-10-101-3/+3
|\
| * Fix ibmdb2 unique constraint handling for sqlalchemy 0.9Matt Riedemann2014-08-041-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ibmdb2 unique constraint code was accessing the private _all_cols member var in iterating over columns which breaks in sqlalchemy 0.9 so fix up the code to not use internals of sqlalchemy. UniqueConstraint in sqlalchemy extends ColumnCollectionConstraint which implements __iter__ to generate a tuple of the columns in the constraint, so we just iterate over the constraint as the fix. This is based on a patch from Rahul Priyadarshi in ibm-db-sa issue 158: https://code.google.com/p/ibm-db/issues/detail?id=158 Co-Authored-By: Rahul Priyadarshi <rahul.priyadarshi@in.ibm.com> Change-Id: I0f06f6314c382e83573d762abe5981db0a02a83a
* | SqlScript: execute multiple statements one by one0.9.2Ihar Hrachyshka2014-08-233-9/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some drivers [f.e. MySQL Connector] do not like multiple statements being passed to .execute(). They require either passing multi=True parameter to .execute() that is not DB-API 2.0 defined, or executing those statements one by one. For that patch, I've chosen the second option to stay away from driver specific hacks. Also removed SQLite hack that seems to be related to the same multiple statements issue. blueprint enable-mysql-connector Change-Id: Ic6d53ed1fef8aee9471f3540f06b39cd5ee4ef82
* | Make sure we don't throw away exception on SQL script failureIhar Hrachyshka2014-08-231-1/+2
| | | | | | | | | | | | | | | | | | If SQL script failed, we don't currently log the failure anywhere, so users have hard time debugging an issue, if anything arises. Let's log the failure before proceeding with rollback. Change-Id: Ic92b1403c00bb238a68265a15150a4be6f6b2346
* | Pin testtools to < 0.9.36Ihar Hrachyshka2014-08-231-1/+1
|/ | | | | | | | | New testtools require that setUp() and tearDown() are not called twice, while test_schema is built around multiple calls. So pinning the version for now until a proper fix is implemented. Closes-Bug: 1360252 Change-Id: I184db35242d036dacc7933c1d762cccc7f5c40bb
* Merge "Fix 3 files with Windows line endings to Unix line endings."Jenkins2014-07-223-493/+491
|\
| * Fix 3 files with Windows line endings to Unix line endings.David Ripton2014-02-273-493/+491
| | | | | | | | Change-Id: Iadc8e5d195bf998a117da4b7102a8955e238dd4e
* | Merge "Move patch from oslo to drop unique constraints with sqlite"0.9.1Jenkins2014-05-052-4/+49
|\ \
| * | Move patch from oslo to drop unique constraints with sqliteMatt Riedemann2014-04-152-4/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | oslo-incubator commit 3f503faac for making sqlite work with dropping unique constraints in database migrations. This was made in oslo-incubator since at the time sqlalchemy-migrate was not in stackforge. Now that we can update sqlalchemy-migrate, move the patch over from oslo. This change also adds the support for the case that a unique constraint is dropped because the column it's on is dropped. Note that there are already unit tests that cover dropping a unique constraint directly and implicitly via dropping a column that is in the unique constraint. Related-Bug: #1307266 Change-Id: I5ee8082a83aebf66f6e1dacb093ed79e13f73f5e
* | | Port to Python3Cyril Roelandt2014-04-0931-88/+202
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Brief summary of the modifications: * Use six for compatibility with both Python 2 and 3; * Replace UserDict.DictMixin with collections.MutableMapping; * Fix relative imports; * Use test-requirements.txt for requirements that are common to both Python 2 and 3, and test-requirements-py{2,3}.txt for version-specific requirements; * Miscellaneous fixes. * Use a specific test_db_py3.cfg file for Python 3, that only runs tests on sqlite. Thanks to Victor Stinner who co-wrote this patch. Change-Id: Ia6dc536c39d274924c21fd5bb619e8e5721e04c4 Co-Authored-By: Victor Stinner <victor.stinner@enovance.com>
* | tests: Replace "self.assert_" by "self.assertTrue"Cyril Roelandt2014-03-3113-108/+108
| | | | | | | | | | | | | | | | The assert_() method is deprecated and can be safely replaced by assertTrue(). This patch makes sure that running the tests does not fill the screen with warnings. Change-Id: I8966b7f7a44f1573a4d2c398717bfc68ae40b197
* | Merge "Convert tabs to spaces in a couple of rst files"Jenkins2014-03-292-11/+11
|\ \
| * | Convert tabs to spaces in a couple of rst filesDavid Ripton2014-02-262-33/+33
| |/ | | | | | | | | | | | | These restructured text files mostly use spaces, but a few stray tabs crept in. Change them for consistency. Change-Id: I89f390d02c737798007423a5126d81ad3d9e032e
* | Merge "Eradicate trailing whitespace"Jenkins2014-03-2942-227/+227
|\ \
| * | Eradicate trailing whitespaceDavid Ripton2014-02-2644-245/+245
| |/ | | | | | | | | | | | | | | | | | | 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
* | turn on testing for sqla 0.90.9Sean Dague2014-03-051-3/+23
| | | | | | | | | | | | | | this enables tox testing for the sqla 0.9 changes, and provides new targets for sqla 0.9 and 0.8. Change-Id: I297dce0267bd10cd7db0fe270945c8e5a3431167
* | Replace AbstractType by TypeEngineThomas Goirand2014-03-051-1/+1
| | | | | | | | | | | | | | AbstractType not longer exists in the class hierarchy for types. TypeEngine was its direct descendant, so use that instead. Change-Id: Idbfaee4b0d3acbc4795913ddf2ab4e1c9b6d065c
* | fix scripttest compatThomas Goirand2014-03-051-1/+0
| | | | | | | | | | | | | | | | There's no script_path param in the current version of scripttest. This patch fixes that by removing the param, which by the way isn't useful. Change-Id: Ic78cea25bb472702473e98b48a8ff74c01545aa3
* | Use native quote attribute introduced in sqla 0.9Thomas Goirand2014-03-054-24/+43
| | | | | | | | | | | | | | | | | | 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
* | Fix genmodel for SQLA 0.9Thomas Goirand2014-03-051-10/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: * Some python code was auto generated and exec'ed in that package. * The python code that was problematic had a 'Table' definition * The generated code imports '*' from sqlalchemy * One among the 'Column' was defined as an 'INTEGER' type, which points to sqlalchemy.sql.sqltypes.INTEGER * The INTEGER class was initialised with a parameter display_width which contradicts with sqlalchemy.sql.sqltypes.INTEGER.__init__, which does not accept any parameters * The 'INTEGER' class should have been imported from mysql dialects' type module Solution: * While generating, in the header part, I am now checking if any of the column.type.__class__.__name__ has 'dialects' in it. * If I find any, I am adding the import rule such that the type is imported from the dialects' type. This patch has been tested with SQLA 0.9.3, for which it fixes the unit tests, and with SQLA 0.8.2, which doesn't have (new) problems with this patch. Change-Id: Ie0e09b45388462629100017bea3ea8a314d148d8
* | Merge "UniqueConstraint named and escaped twice"Jenkins2014-03-051-1/+1
|\ \
| * | UniqueConstraint named and escaped twiceThomas Goirand2014-03-021-1/+1
| |/ | | | | | | | | | | | | | | 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
* | Merge "Conditionally import ibmdb2/ibm_db_sa"Jenkins2014-03-041-3/+11
|\ \
| * | Conditionally import ibmdb2/ibm_db_saMatt Riedemann2014-03-041-3/+11
| |/ | | | | | | | | | | | | | | | | | | 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
* | migrate needs subunit >= 0.0.18Thomas Goirand2014-03-021-1/+1
|/ | | | | | | | The unit tests of subunit are failing with an older version of subunit, so we need to fix the test-requirements.txt to reflect the reality. Change-Id: I786c70a02196b00fb0d96feb5fd1a0b5281f6672
* Merge "Add DB2 10.5 Support"0.8.40.8.3Jenkins2014-02-2313-15/+397
|\
| * Add DB2 10.5 SupportMatt Riedemann2014-02-1713-15/+397
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | uncap SQLA in requirements.txt0.8.5Sean Dague2014-02-232-1/+12
|/ | | | | | | | | | | | | migrate can't just take a global requirements sync because it needs to be tested against multiple versions of SQLA to assure compatibility. A recent change had the effect of only testing migrate against SQLA 0.7, which is definitely *not* what we want to be doing. this reverts that change, and leaves very specific comments to hopefully prevent this from happening in the future. Change-Id: Icb4e136f0de6caa224019bb955341c4b67c5e1a1
* Sync with global requirementsSascha Peilicke2014-02-122-9/+9
| | | | Change-Id: If05a5d65558ca848b80c3f57c19cb5029adbe58a
* Fix broken development version link in READMEEric Harney2013-11-151-1/+1
| | | | Change-Id: Id9035c167d397cdad32d418c37108586344d8edc
* Un-break the version in migrate/__init__.py0.8.2Monty Taylor2013-11-151-1/+4
| | | | Change-Id: Ie642315c20866435a709d576c99d6e293e7a7e63
* Fix the version number to match the last release.Dan Prince2013-11-151-1/+1
| | | | | | | ** NOTE: our release process really should do this ahead of time. Change-Id: Ic0cce0d57b4f05092417c4cf1a4ca5a74812ec3c
* Merge "Remove the tag_build line from setup.cfg"0.8.1Jenkins2013-11-151-1/+0
|\
| * Remove the tag_build line from setup.cfgDavid Ripton2013-11-141-1/+0
| | | | | | | | | | | | | | It was causing the release tarball to have an extra ".dev." in its filename, which then broke the script that uploads the release to PyPI. Change-Id: I995fb3e0393468568601e8614c0532b93fbe8ceb
* | Drop setuptools_git test requirementSascha Peilicke2013-11-141-1/+0
|/ | | | | | We don't need this since we're using pbr. Change-Id: I7c5985fac66d5e7a4fca1b3945a18a364a94e971
* Fix int overflow exception in unittest0.8Matt Riedemann2013-11-061-2/+17
| | | | | | | | | | | | | | | | | | Fixes: File ".../versioning/version.py", line 30, in __init__ if self < 0: OverflowError: Python int too large to convert to C long Don't use __cmp__ which is deprecated and restricted to C long ints, rather than python's arbitrary precision ints. Copied from Pádraig Brady's Fedora patch: http://pkgs.fedoraproject.org/cgit/python-migrate.git/commit/?id=a01bf449 Co-authored-by: Pádraig Brady <pbrady@redhat.com> Change-Id: I71f349f97507525b2f2edaf034005d67b6cc3987
* Fix dropping of indexed columns in sqlite/sa08Roman Podolyaka2013-10-183-3/+39
| | | | | | | | | | | | | | | | | | | | | | | | | 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
* Run tests on PostgreSQL and MySQL tooRoman Podolyaka2013-10-124-13/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | In addition to running tests with different Python and SQLAlchemy versions, they should also be run on different DB backends, which are used in production (PostgreSQL and MySQL). This patch: - modifies test_db.cfg to run tests on PostgreSQL and MySQL (Jenkins Slave credentials are used here, to ensure these tests are always run by Jenkins gate); if a backend is not available, test cases will be skipped for it - concurrency is set to 1 (sharing of the one MySQL or PostgreSQL DB among different test runner processes would lead to race conditions) - fixes tests dropping FK columns in MySQL: in earlier MySQL versions dropping a column that is a part of a FK constraint would lead to dropping of the FK too. As of MySQL 5.5 that's not the case anymore: if one tries to drop such column, he/she will get a very obscure error (something like "Error on rename of './openstack_citest/#sql-4af_aa2' to './openstack_citest/tmp_adddropcol' (errno: 150)") '\nALTER TABLE tmp_adddropcol DROP COLUMN r2'). So the solution if to drop FK constraints first, and only then the columns it is made up of Change-Id: I8c5d2874c83e7df46da69969ed54d85437c849e7
* Update tox requirementsMonty Taylor2013-10-071-0/+4
| | | | | | | | Update to needing 1.6, which gives us the ability to alter how the software is installed into the virtualenv. It also brings in pip 1.4, which lets us avoid getting pre-releases of things we weren't expecting. Change-Id: I3189f06610d776a032b5f8bf0910f59e4ed45719
* Stop using the d2to1-based pbrMonty Taylor2013-10-073-8/+3
| | | | | | | | | | | | | | | | | | pbr updated itself to remove the d2to1 dependency. One of the main reasons for this is a direct upstream dependency on distribute, which causes the distribute/setuptools merge bug to get triggered, which breaks people's system if they install with pip < 1.4. Remove d2to1 references, and also bump the required version requested of pbr to a version late enough to no longer depend on d2to1. Remove the version specifier from setup.py, because setup_requires has no way to trigger a version requirement upgrade. The flat version should be sufficient for the setup.py interface in perpetuity. Remove the setup-hook from setup.cfg, as it is no longer needed. Change-Id: I40d3507c77802d13fd894aa16714b2ed6aa7d59f
* decouple index name generation from sqlalchemy versionPádraig Brady2013-09-231-15/+19
| | | | | | | | | | 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
* Run tests with different SQLAlchemy versionsRoman Podolyaka2013-08-051-1/+11
| | | | | | | | | | | | | The test suite should be run for all possible combinations of Python and SQLAlchemy versions we claim to support, which are Python 2.6 and 2.7 and SQLAlchemy 0.7.x (old stable) and 0.8.x (mainline stable). py26/py27 tox envs install the latest stable version of SQLAlchemy (currently, 0.8.x branch), so two additional tox environments added to run the test suite with SQLAlchemy 0.7.x (for both Python 2.6 and 2.7). Change-Id: I50c7009d8b808ce3bbb1f0a27c50f5cb5116cdb3
* Add a workaround for pytz and pip>=1.4Roman Podolyaka2013-08-051-1/+3
| | | | | | | | pip versions >= 1.4 will not install pytz unless a minimum version containing a letter is specified (this workaround is taken from Babel Python library). Change-Id: Ic013fca82816cd89e446282d3936e38ea2c39274
* Add a reqs files for RTFDMonty Taylor2013-07-121-0/+2
| | | | | | | RTFD only has a single requirements field, so make one that installs the total set of needed requirements to allow docs to build properly. Change-Id: I79b8202a6a7944cec052a2431dff670258bf7171
* Fix exceptions for SQLAlchemy 0.8Pádraig Brady2013-07-111-2/+2
| | | | Change-Id: Ib541ac9d6b397300e34ca8b65aad459b612858c3
* added bugfixes for 0.8Josip Delic2013-07-115-19/+27
|
* Updated to OpenStack Build stuff.Monty Taylor2013-07-1148-220/+246
|
* Removed hg and google code referencesMonty Taylor2013-07-111-4/+3
|
* Initial changes to import into StackForge.Monty Taylor2013-07-119-23/+51
|
* update changelogJan Dittberner2013-02-091-0/+3
|