applying patch for issue #61 by Michael Bayer
This commit is contained in:
@@ -2,10 +2,12 @@
|
|||||||
Firebird database specific implementations of changeset classes.
|
Firebird database specific implementations of changeset classes.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from migrate.changeset import ansisql, exceptions
|
from migrate.changeset import ansisql, exceptions, SQLA_06
|
||||||
|
|
||||||
# TODO: SQLA 0.6 has not migrated the FB dialect over yet
|
|
||||||
from sqlalchemy.databases import firebird as sa_base
|
from sqlalchemy.databases import firebird as sa_base
|
||||||
|
|
||||||
|
if SQLA_06:
|
||||||
|
FBSchemaGenerator = sa_base.FBDDLCompiler
|
||||||
|
else:
|
||||||
FBSchemaGenerator = sa_base.FBSchemaGenerator
|
FBSchemaGenerator = sa_base.FBSchemaGenerator
|
||||||
|
|
||||||
class FBColumnGenerator(FBSchemaGenerator, ansisql.ANSIColumnGenerator):
|
class FBColumnGenerator(FBSchemaGenerator, ansisql.ANSIColumnGenerator):
|
||||||
|
@@ -4,11 +4,12 @@
|
|||||||
.. _`PostgreSQL`: http://www.postgresql.org/
|
.. _`PostgreSQL`: http://www.postgresql.org/
|
||||||
"""
|
"""
|
||||||
from migrate.changeset import ansisql, SQLA_06
|
from migrate.changeset import ansisql, SQLA_06
|
||||||
from sqlalchemy.databases import postgres as sa_base
|
|
||||||
|
|
||||||
if not SQLA_06:
|
if not SQLA_06:
|
||||||
|
from sqlalchemy.databases import postgres as sa_base
|
||||||
PGSchemaGenerator = sa_base.PGSchemaGenerator
|
PGSchemaGenerator = sa_base.PGSchemaGenerator
|
||||||
else:
|
else:
|
||||||
|
from sqlalchemy.databases import postgresql as sa_base
|
||||||
PGSchemaGenerator = sa_base.PGDDLCompiler
|
PGSchemaGenerator = sa_base.PGDDLCompiler
|
||||||
|
|
||||||
|
|
||||||
|
@@ -16,6 +16,7 @@ DIALECTS = {
|
|||||||
"default": ansisql.ANSIDialect,
|
"default": ansisql.ANSIDialect,
|
||||||
"sqlite": sqlite.SQLiteDialect,
|
"sqlite": sqlite.SQLiteDialect,
|
||||||
"postgres": postgres.PGDialect,
|
"postgres": postgres.PGDialect,
|
||||||
|
"postgresql": postgres.PGDialect,
|
||||||
"mysql": mysql.MySQLDialect,
|
"mysql": mysql.MySQLDialect,
|
||||||
"oracle": oracle.OracleDialect,
|
"oracle": oracle.OracleDialect,
|
||||||
"firebird": firebird.FBDialect,
|
"firebird": firebird.FBDialect,
|
||||||
|
@@ -6,6 +6,7 @@ from decorator import decorator
|
|||||||
|
|
||||||
from sqlalchemy import create_engine, Table, MetaData
|
from sqlalchemy import create_engine, Table, MetaData
|
||||||
from sqlalchemy.orm import create_session
|
from sqlalchemy.orm import create_session
|
||||||
|
from sqlalchemy.pool import StaticPool
|
||||||
|
|
||||||
from test.fixture.base import Base
|
from test.fixture.base import Base
|
||||||
from test.fixture.pathed import Pathed
|
from test.fixture.pathed import Pathed
|
||||||
@@ -50,7 +51,7 @@ def is_supported(url, supported, not_supported):
|
|||||||
|
|
||||||
# we make the engines global, which should make the tests run a bit faster
|
# we make the engines global, which should make the tests run a bit faster
|
||||||
urls = readurls()
|
urls = readurls()
|
||||||
engines = dict([(url, create_engine(url, echo=True)) for url in urls])
|
engines = dict([(url, create_engine(url, echo=True, poolclass=StaticPool)) for url in urls])
|
||||||
|
|
||||||
|
|
||||||
def usedb(supported=None, not_supported=None):
|
def usedb(supported=None, not_supported=None):
|
||||||
|
Reference in New Issue
Block a user