From: Mike Bayer Date: Tue, 26 May 2015 14:55:36 +0000 (-0400) Subject: - turn on the mssql legacy_schema_aliasing flag to remove X-Git-Tag: rel_0_7_7~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=229f86723be4404c1bff3a63d97ab9f32ba93b0b;p=thirdparty%2Fsqlalchemy%2Falembic.git - turn on the mssql legacy_schema_aliasing flag to remove warnings --- diff --git a/alembic/testing/assertions.py b/alembic/testing/assertions.py index fd65fd6e..b3a5acda 100644 --- a/alembic/testing/assertions.py +++ b/alembic/testing/assertions.py @@ -89,6 +89,8 @@ def _get_dialect(name): _dialects[name] = d = dialect_mod.dialect() if name == 'postgresql': d.implicit_returning = True + elif name == 'mssql': + d.legacy_schema_aliasing = False return d diff --git a/alembic/util.py b/alembic/util.py index 87bc7b1c..2e0f731f 100644 --- a/alembic/util.py +++ b/alembic/util.py @@ -37,6 +37,7 @@ sqla_094 = _vers >= (0, 9, 4) sqla_094 = _vers >= (0, 9, 4) sqla_099 = _vers >= (0, 9, 9) sqla_100 = _vers >= (1, 0, 0) +sqla_105 = _vers >= (1, 0, 5) if not sqla_07: raise CommandError( "SQLAlchemy 0.7.3 or greater is required. ") diff --git a/tests/test_mssql.py b/tests/test_mssql.py index 19453b22..0ec18e2b 100644 --- a/tests/test_mssql.py +++ b/tests/test_mssql.py @@ -18,7 +18,11 @@ class FullEnvironmentTests(TestBase): @classmethod def setup_class(cls): staging_env() - cls.cfg = cfg = _no_sql_testing_config("mssql") + if util.sqla_105: + directives = "sqlalchemy.legacy_schema_aliasing=false" + else: + directives = "" + cls.cfg = cfg = _no_sql_testing_config("mssql", directives) cls.a, cls.b, cls.c = \ three_rev_fixture(cfg)