summaryrefslogtreecommitdiff
path: root/migrate/tests/changeset/test_changeset.py
Commit message (Collapse)AuthorAgeFilesLines
* Retire github mirror, repo moved to opendevHEADmasterJim Rollenhagen2019-09-261-976/+0
|
* Merge "Fix spelling mistake"Jenkins2017-03-241-1/+1
|\
| * Fix spelling mistakedineshbhor2016-10-261-1/+1
| | | | | | | | | | | | TrivialFix Change-Id: I089d9e8b57895d9878bf82d2fac397722fccc083
* | Set autoincrement to False when modifying to non-Integer datatypeMike Bayer2016-10-201-0/+13
|/ | | | | | | | | | | | Starting in SQLAlchemy 1.1, the rules for when "autoincrement=True" may be set on a column are more strict. The migrate tests are testing the alteration of a column from Integer to String and then regenerating; this means we need to set autoincrement to False as well. A related issue in SQLAlchemy 1.1 is also being fixed (see https://bitbucket.org/zzzeek/sqlalchemy/issues/3835/), however this fix is not needed in order for the tests to pass here. Change-Id: Ibd3a75fff13312411df87e17b6e5764865d69728
* Port to Python3Cyril Roelandt2014-04-091-4/+5
| | | | | | | | | | | | | | | | | | 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-311-21/+21
| | | | | | | | 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
* Eradicate trailing whitespaceDavid Ripton2014-02-261-24/+24
| | | | | | | | | | 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
* Add DB2 10.5 SupportMatt Riedemann2014-02-171-11/+17
| | | | | | | | | | | | | | | | | | 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
* Fix dropping of indexed columns in sqlite/sa08Roman Podolyaka2013-10-181-1/+34
| | | | | | | | | | | | | | | | | | | | | | | | | 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-121-3/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Fix exceptions for SQLAlchemy 0.8Pádraig Brady2013-07-111-2/+2
| | | | Change-Id: Ib541ac9d6b397300e34ca8b65aad459b612858c3
* Updated to OpenStack Build stuff.Monty Taylor2013-07-111-21/+21
|
* drop SQLAlchemy < 0.6 compatibility codeJan Dittberner2011-10-281-19/+11
|
* fix issue 128: "table rename failure with sqlalchemy 0.7.x"markbmc@gmail.com2011-10-281-1/+9
|
* fix column.create() properlyJan Dittberner2011-05-271-2/+0
|
* fix unit test for adding new columns with foreign keysJan Dittberner2011-05-261-1/+8
|
* fix one more test (addresses #112)Jan Dittberner2011-05-251-1/+4
|
* Bring back alter_metadata on ColumnDelta: it seems intertwined with a lot of ↵Chris Withers2011-02-111-15/+18
| | | | | the tests. So, it's a private API now...
* remove the alter_metadata featureChris Withers2011-02-101-52/+16
|
* firebird can only drop named foreign keysChris Withers2011-02-101-1/+2
|
* These drop indexes appear to only be for firebird.Chris Withers2011-02-101-2/+0
| | | Once firebird is fixed, they're not needed.
* Fix issue 94 - it was impossible to add a column with a non-unique index.chrisw2010-09-091-7/+29
| | | Also implement more functionality with unique and foreign key constrains for sqlite.
* implement column adding with foreign keys on sqlitechrisw2010-09-091-14/+10
|
* Fix bug with column dropping involving foreign keys.chrisw2010-09-091-0/+90
| | | Bonus: remove_from_table now understands foreign keys
* fix for issue 96: deleting a column in sqlite shouldn't delete all indexeschrisw2010-09-091-0/+34
| | | bonus: remove_from_table now removes indexes
* dammit!chrisw2010-09-081-1/+1
|
* hopefully fix test failureschrisw2010-09-081-12/+6
|
* hopefully make py2.4 compatiblechrisw2010-09-071-3/+8
|
* - capture deprecation warnings and assert they re as they should bechrisw2010-09-071-12/+33
| | | - re-word alter_column deprecation warning to make more sense
* move all exception classes to migrate.exceptionsiElectric2010-09-071-6/+6
|
* move tests/ directory into migrate/tests (much better form) and fix all ↵Bob Farrell2010-06-101-0/+774
import lines and other minor issues