applying patch for issue #61 by Michael Bayer

This commit is contained in:
iElectric 2009-07-13 18:45:52 +02:00
parent 9ef49f8c01
commit 7cb4b6363c
4 changed files with 11 additions and 6 deletions

View File

@ -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."""

View File

@ -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

View File

@ -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,

View File

@ -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):