diff options
author | Federico Caselli <cfederico87@gmail.com> | 2021-10-30 22:24:51 +0200 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2021-10-31 12:31:56 -0400 |
commit | ed78e679eafe787f4c152b78726bf1e1b91ab465 (patch) | |
tree | 9ba564f0ad1f0569650fcf803157bf4576fc738f /lib/sqlalchemy/testing/schema.py | |
parent | 4427ec68219b624a89dda4acb994c80fa0d8a5d7 (diff) | |
download | sqlalchemy-ed78e679eafe787f4c152b78726bf1e1b91ab465.tar.gz |
Remove deprecated dialects and drivers
Fixes: #7258
Change-Id: I3577f665eca04f2632b69bcb090f0a4ec9271db9
Diffstat (limited to 'lib/sqlalchemy/testing/schema.py')
-rw-r--r-- | lib/sqlalchemy/testing/schema.py | 35 |
1 files changed, 2 insertions, 33 deletions
diff --git a/lib/sqlalchemy/testing/schema.py b/lib/sqlalchemy/testing/schema.py index 9c6bf9e4c..9b5546ce7 100644 --- a/lib/sqlalchemy/testing/schema.py +++ b/lib/sqlalchemy/testing/schema.py @@ -48,37 +48,6 @@ def Table(*args, **kw): else: kw["mariadb_engine"] = "MyISAM" - # Apply some default cascading rules for self-referential foreign keys. - # MySQL InnoDB has some issues around selecting self-refs too. - if exclusions.against(config._current, "firebird"): - table_name = args[0] - unpack = config.db.dialect.identifier_preparer.unformat_identifiers - - # Only going after ForeignKeys in Columns. May need to - # expand to ForeignKeyConstraint too. - fks = [ - fk - for col in args - if isinstance(col, schema.Column) - for fk in col.foreign_keys - ] - - for fk in fks: - # root around in raw spec - ref = fk._colspec - if isinstance(ref, schema.Column): - name = ref.table.name - else: - # take just the table name: on FB there cannot be - # a schema, so the first element is always the - # table name, possibly followed by the field name - name = unpack(ref)[0] - if name == table_name: - if fk.ondelete is None: - fk.ondelete = "CASCADE" - if fk.onupdate is None: - fk.onupdate = "CASCADE" - return schema.Table(*args, **kw) @@ -101,9 +70,9 @@ def Column(*args, **kw): # allow any test suite to pick up on this col.info["test_needs_autoincrement"] = True - # hardcoded rule for firebird, oracle; this should + # hardcoded rule for oracle; this should # be moved out - if exclusions.against(config._current, "firebird", "oracle"): + if exclusions.against(config._current, "oracle"): def add_seq(c, tbl): c._init_items( |