diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2008-03-22 19:30:42 +0000 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2008-03-22 19:30:42 +0000 |
| commit | 82198afee9a94925d6b30eb0e612fd3a93170338 (patch) | |
| tree | 053230cba763ddc47b58281a8e04eec44bb33d79 /test/testlib | |
| parent | 2cff3ad9f8b90e82aa396ba26dd83b95b21c15ff (diff) | |
| download | sqlalchemy-82198afee9a94925d6b30eb0e612fd3a93170338.tar.gz | |
- the "owner" keyword on Table is now deprecated, and is
exactly synonymous with the "schema" keyword. Tables
can now be reflected with alternate "owner" attributes,
explicitly stated on the Table object or not using
"schema".
- all of the "magic" searching for synonyms, DBLINKs etc.
during table reflection
are disabled by default unless you specify
"oracle_resolve_synonyms=True" on the Table object.
Resolving synonyms necessarily leads to some messy
guessing which we'd rather leave off by default.
When the flag is set, tables and related tables
will be resolved against synonyms in all cases, meaning
if a synonym exists for a particular table, reflection
will use it when reflecting related tables. This is
stickier behavior than before which is why it's
off by default.
Diffstat (limited to 'test/testlib')
| -rw-r--r-- | test/testlib/schema.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/test/testlib/schema.py b/test/testlib/schema.py index 7f6370482..63eb5be92 100644 --- a/test/testlib/schema.py +++ b/test/testlib/schema.py @@ -55,7 +55,6 @@ def Table(*args, **kw): return schema.Table(*args, **kw) -generic_counter = itertools.count() def Column(*args, **kw): """A schema.Column wrapper/hook for dialect-specific tweaks.""" @@ -64,8 +63,12 @@ def Column(*args, **kw): if schema is None: from sqlalchemy import schema + test_opts = dict([(k,kw.pop(k)) for k in kw.keys() + if k.startswith('test_')]) + if testing.against('oracle'): - if kw.get('primary_key') == True and kw.get('default') == None: - kw['default'] = generic_counter.next + if 'test_needs_autoincrement' in test_opts: + args = list(args) + args.append(schema.Sequence(args[0], optional=True)) return schema.Column(*args, **kw) |
