]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
support BLANK_SCHEMA, RETAIN_SCHEMA FK schema on copy
authorMike Bayer <mike_mp@zzzcomputing.com>
Sat, 26 Mar 2022 14:09:10 +0000 (10:09 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sat, 26 Mar 2022 14:11:31 +0000 (10:11 -0400)
commit74d3f3965b383aef7421f2cf1779573a4ac65987
treeffbbe8818f23cbc1c4ace1888ca01ced4f4e8591
parent59308fd60fd8f7750205063134df4b944d12704b
support BLANK_SCHEMA, RETAIN_SCHEMA FK schema on copy

Added support so that the :paramref:`.Table.tometadata.referred_schema_fn`
callable passed to :meth:`.Table.to_metadata` may return the value
:data:`.BLANK_SCHEMA` to indicate that the referenced foreign key should be
reset to None. The :data.`RETAIN_SCHEMA` symbol may also be returned from
this function to indicate "no change", which will behave the same as
``None`` currently does which also indicates no change.

Fixes: #7860
Change-Id: I82a45988d534295d8356453f68001b21d4ff706d
doc/build/changelog/unreleased_14/7860.rst [new file with mode: 0644]
lib/sqlalchemy/sql/schema.py
test/sql/test_metadata.py