summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/testing/schema.py
diff options
context:
space:
mode:
authorFederico Caselli <cfederico87@gmail.com>2021-10-30 22:24:51 +0200
committerMike Bayer <mike_mp@zzzcomputing.com>2021-10-31 12:31:56 -0400
commited78e679eafe787f4c152b78726bf1e1b91ab465 (patch)
tree9ba564f0ad1f0569650fcf803157bf4576fc738f /lib/sqlalchemy/testing/schema.py
parent4427ec68219b624a89dda4acb994c80fa0d8a5d7 (diff)
downloadsqlalchemy-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.py35
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(