SA06 tests fix, thanks to Mike Bayer

This commit is contained in:
iElectric 2010-05-02 03:03:03 +02:00
parent 43e0c3caf2
commit 81f447ef77
2 changed files with 8 additions and 1 deletions

2
TODO
View File

@ -13,9 +13,9 @@ make_update_script_for_model:
- make logging stderr and stdout aware
- update documentation
- update repository migration script
- readd transaction support
- wrap migration into transaction
- interactive migration script resolution
- readd transaction support
- port to unittest2
- write documentation how to test all databases

View File

@ -7,6 +7,7 @@
import sqlalchemy as sa
from sqlalchemy.schema import SchemaVisitor
from sqlalchemy.engine.default import DefaultDialect
from sqlalchemy.sql import ClauseElement
from sqlalchemy.schema import (ForeignKeyConstraint,
PrimaryKeyConstraint,
CheckConstraint,
@ -23,9 +24,15 @@ else:
from sqlalchemy.sql.compiler import DDLCompiler
SchemaGenerator = SchemaDropper = DDLCompiler
class AlterTableVisitor(SchemaVisitor):
"""Common operations for ``ALTER TABLE`` statements."""
if SQLA_06:
# engine.Compiler looks for .statement
# when it spawns off a new compiler
statement = ClauseElement()
def append(self, s):
"""Append content to the SchemaIterator's query buffer."""