22 Commits

Author SHA1 Message Date
Roman Podolyaka
a91766a1ac Run tests on PostgreSQL and MySQL too
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
2013-10-12 07:04:33 +00:00
Pádraig Brady
74ccf7a397 Fix exceptions for SQLAlchemy 0.8
Change-Id: Ib541ac9d6b397300e34ca8b65aad459b612858c3
2013-07-11 22:01:32 -04:00
Monty Taylor
a71799ea2c Updated to OpenStack Build stuff. 2013-07-11 16:54:46 -04:00
Jan Dittberner
3619347441 drop SQLAlchemy < 0.6 compatibility code 2011-10-28 10:59:10 +02:00
markbmc@gmail.com
6ecf665f14 fix issue 128: "table rename failure with sqlalchemy 0.7.x" 2011-10-28 09:34:08 +02:00
Jan Dittberner
ca5d59910a fix column.create() properly 2011-05-27 21:59:35 +02:00
Jan Dittberner
1af477e661 fix unit test for adding new columns with foreign keys 2011-05-26 21:43:27 +02:00
Jan Dittberner
24031b7e82 fix one more test (addresses #112) 2011-05-25 16:06:42 +02:00
Chris Withers
0645c2fc9a Bring back alter_metadata on ColumnDelta: it seems intertwined with a lot of the tests.
So, it's a private API now...
2011-02-11 10:27:39 +00:00
Chris Withers
b5a02cb7cf remove the alter_metadata feature 2011-02-10 16:49:20 +00:00
Chris Withers
b1745bee52 firebird can only drop named foreign keys 2011-02-10 15:16:35 +00:00
Chris Withers
f749919240 These drop indexes appear to only be for firebird.
Once firebird is fixed, they're not needed.
2011-02-10 15:16:15 +00:00
chrisw
adf4113a0b Fix issue 94 - it was impossible to add a column with a non-unique index.
Also implement more functionality with unique and foreign key constrains for sqlite.
2010-09-09 15:38:42 +01:00
chrisw
a085ffa590 implement column adding with foreign keys on sqlite 2010-09-09 13:58:41 +01:00
chrisw
a7c0c18a52 Fix bug with column dropping involving foreign keys.
Bonus: remove_from_table now understands foreign keys
2010-09-09 11:53:08 +01:00
chrisw
5cf42fbf76 fix for issue 96: deleting a column in sqlite shouldn't delete all indexes
bonus: remove_from_table now removes indexes
2010-09-09 09:15:28 +01:00
chrisw
802658018d dammit! 2010-09-08 16:21:54 +01:00
chrisw
10a16f5251 hopefully fix test failures 2010-09-08 14:35:01 +01:00
chrisw
ac848a295a hopefully make py2.4 compatible 2010-09-07 19:19:32 +01:00
chrisw
cade5fb261 - capture deprecation warnings and assert they re as they should be
- re-word alter_column deprecation warning to make more sense
2010-09-07 19:04:12 +01:00
iElectric
653e723ce1 move all exception classes to migrate.exceptions 2010-09-07 02:25:29 +02:00
Bob Farrell
fd8d313683 move tests/ directory into migrate/tests (much better form) and fix all import lines and other minor issues 2010-06-10 18:08:06 +01:00