applying patch for issue #61 by Michael Bayer
This commit is contained in:
parent
9ef49f8c01
commit
7cb4b6363c
@ -2,11 +2,13 @@
|
||||
Firebird database specific implementations of changeset classes.
|
||||
"""
|
||||
|
||||
from migrate.changeset import ansisql, exceptions
|
||||
|
||||
# TODO: SQLA 0.6 has not migrated the FB dialect over yet
|
||||
from migrate.changeset import ansisql, exceptions, SQLA_06
|
||||
from sqlalchemy.databases import firebird as sa_base
|
||||
FBSchemaGenerator = sa_base.FBSchemaGenerator
|
||||
|
||||
if SQLA_06:
|
||||
FBSchemaGenerator = sa_base.FBDDLCompiler
|
||||
else:
|
||||
FBSchemaGenerator = sa_base.FBSchemaGenerator
|
||||
|
||||
class FBColumnGenerator(FBSchemaGenerator, ansisql.ANSIColumnGenerator):
|
||||
"""Firebird column generator implementation."""
|
||||
|
@ -4,11 +4,12 @@
|
||||
.. _`PostgreSQL`: http://www.postgresql.org/
|
||||
"""
|
||||
from migrate.changeset import ansisql, SQLA_06
|
||||
from sqlalchemy.databases import postgres as sa_base
|
||||
|
||||
if not SQLA_06:
|
||||
from sqlalchemy.databases import postgres as sa_base
|
||||
PGSchemaGenerator = sa_base.PGSchemaGenerator
|
||||
else:
|
||||
from sqlalchemy.databases import postgresql as sa_base
|
||||
PGSchemaGenerator = sa_base.PGDDLCompiler
|
||||
|
||||
|
||||
|
@ -16,6 +16,7 @@ DIALECTS = {
|
||||
"default": ansisql.ANSIDialect,
|
||||
"sqlite": sqlite.SQLiteDialect,
|
||||
"postgres": postgres.PGDialect,
|
||||
"postgresql": postgres.PGDialect,
|
||||
"mysql": mysql.MySQLDialect,
|
||||
"oracle": oracle.OracleDialect,
|
||||
"firebird": firebird.FBDialect,
|
||||
|
@ -6,6 +6,7 @@ from decorator import decorator
|
||||
|
||||
from sqlalchemy import create_engine, Table, MetaData
|
||||
from sqlalchemy.orm import create_session
|
||||
from sqlalchemy.pool import StaticPool
|
||||
|
||||
from test.fixture.base import Base
|
||||
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
|
||||
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):
|
||||
|
Loading…
x
Reference in New Issue
Block a user