diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-11-30 18:02:57 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-11-30 18:02:57 -0500 |
commit | 96bbcf2542959b5b0dc99bbfb0db9a1db7072bc5 (patch) | |
tree | 1bef6c1a3ec78296b0d7b49491de0fdc3008a9e4 /tests/requirements.py | |
parent | c4409d67985fca04efdad02da8d3a7b8bc7cdc6f (diff) | |
download | alembic-96bbcf2542959b5b0dc99bbfb0db9a1db7072bc5.tar.gz |
- refactor the FK merge a bit
- getting at attributes of FKs varies a bit on SQLA versions,
so implement an _fk_spec() called for all FK inspection
- to enable include_object() filters and allow the FK constraint
code to flow like that of indexes/uniques, change the approach
so that we deal with an _fk_constraint_sig() object again which
contains the real ForeignKeyConstraint() within; we need this
anyway for include_object, but also allows us to use the standard
"drop_constraint" call for rendering.
- enhance tests in test_autogen_fks to support real FK databases like
Postgresql, MySQL, add in InnoDB flags and ensure that FKs refer
to real primary key constraints for PG support
- implement and test include_object() support for FKs
- inspectors all have get_foreign_keys(), no need to check
- repair the drop_constraint call to quote the "type" and table
name correctly, run all constraint drops through drop_constraint()
for rendering
- fix up schema identifiers for foreign key autogens
Diffstat (limited to 'tests/requirements.py')
-rw-r--r-- | tests/requirements.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/requirements.py b/tests/requirements.py index 7512adf..afacd00 100644 --- a/tests/requirements.py +++ b/tests/requirements.py @@ -29,3 +29,13 @@ class DefaultRequirements(SuiteRequirements): lambda config: config.db.dialect.supports_native_boolean ) ) + + @property + def no_fk_names(self): + """foreign key constraints have no names in the DB""" + return exclusions.only_on(['sqlite']) + + @property + def fk_names(self): + """foreign key constraints always have names in the DB""" + return exclusions.fails_on('sqlite') |