- Fixed E Notation issue that prevented the ability to
insert decimal values less than 1E-6. [ticket:1216]
+ - Corrected problems with reflection when dealing with
+ schemas, particularly when those schemas are the
+ default schema. [ticket:1217]
+
0.5.0rc3
========
- features
rows = connection.execute(s).fetchall()
def _gen_fkref(table, rschema, rtbl, rcol):
- if table.schema and rschema != table.schema or rschema != current_schema:
- return '.'.join([rschema, rtbl, rcol])
- else:
+ if rschema == current_schema and not table.schema:
return '.'.join([rtbl, rcol])
+ else:
+ return '.'.join([rschema, rtbl, rcol])
# group rows by constraint ID, to handle multi-column FKs
fknm, scols, rcols = (None, [], [])
scol, rschema, rtbl, rcol, rfknm, fkmatch, fkuprule, fkdelrule = r
# if the reflected schema is the default schema then don't set it because this will
# play into the metadata key causing duplicates.
- if rschema == current_schema:
+ if rschema == current_schema and not table.schema:
schema.Table(rtbl, table.metadata, autoload=True, autoload_with=connection)
else:
schema.Table(rtbl, table.metadata, schema=rschema, autoload=True, autoload_with=connection)
@testing.crashes('firebird', 'No schema support')
@testing.fails_on('sqlite')
# fixme: revisit these below.
- @testing.fails_on('access', 'mssql', 'sybase')
+ @testing.fails_on('access', 'sybase')
def test_explicit_default_schema(self):
engine = testing.db