diff options
author | Matt Riedemann <mriedem@us.ibm.com> | 2013-11-06 13:04:39 -0800 |
---|---|---|
committer | Matt Riedemann <mriedem@us.ibm.com> | 2014-02-17 07:17:31 -0800 |
commit | 85317aead6208cd6377167fc7fcc4f57491d97f9 (patch) | |
tree | 63023270cc933caf4a71197d1082b92fc56b3b75 /migrate/tests/changeset/databases | |
parent | d58e47f85c4ffd7bb2200acd0db8d9bc033db6be (diff) | |
download | sqalchemy-migrate-85317aead6208cd6377167fc7fcc4f57491d97f9.tar.gz |
Add DB2 10.5 Support
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
Diffstat (limited to 'migrate/tests/changeset/databases')
-rw-r--r-- | migrate/tests/changeset/databases/__init__.py | 0 | ||||
-rw-r--r-- | migrate/tests/changeset/databases/test_ibmdb2.py | 32 |
2 files changed, 32 insertions, 0 deletions
diff --git a/migrate/tests/changeset/databases/__init__.py b/migrate/tests/changeset/databases/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/migrate/tests/changeset/databases/__init__.py diff --git a/migrate/tests/changeset/databases/test_ibmdb2.py b/migrate/tests/changeset/databases/test_ibmdb2.py new file mode 100644 index 0000000..4b3f983 --- /dev/null +++ b/migrate/tests/changeset/databases/test_ibmdb2.py @@ -0,0 +1,32 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +import mock + +import six + +from migrate.changeset.databases import ibmdb2 +from migrate.tests import fixture + + +class TestIBMDBDialect(fixture.Base): + """ + Test class for ibmdb2 dialect unit tests which do not require + a live backend database connection. + """ + + def test_is_unique_constraint_with_null_cols_supported(self): + test_values = { + '10.1': False, + '10.4.99': False, + '10.5': True, + '10.5.1': True + } + for version, supported in six.iteritems(test_values): + mock_dialect = mock.MagicMock() + mock_dialect.dbms_ver = version + self.assertEqual( + supported, + ibmdb2.is_unique_constraint_with_null_columns_supported( + mock_dialect), + 'Assertion failed on version: %s' % version) |