diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-02-02 14:37:43 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-02-02 14:37:43 -0500 |
commit | 2d4b457924fa722ef2cf854d8287b9f2f1b51282 (patch) | |
tree | 827d12380d9e2d0c156fa95259e61bd99140014a /lib/sqlalchemy/engine | |
parent | 29de1077b35fb264f4b1727bd1f4987644ff52b7 (diff) | |
download | sqlalchemy-2d4b457924fa722ef2cf854d8287b9f2f1b51282.tar.gz |
- The behavior of :meth:`.Table.tometadata` has been adjusted such that
the schema target of a :class:`.ForeignKey` will not be changed unless
that schema matches that of the parent table. That is, if
a table "schema_a.user" has a foreign key to "schema_b.order.id",
the "schema_b" target will be maintained whether or not the
"schema" argument is passed to :meth:`.Table.tometadata`. However
if a table "schema_a.user" refers to "schema_a.order.id", the presence
of "schema_a" will be updated on both the parent and referred tables.
This is a behavioral change hence isn't likely to be backported to
0.8; it is assumed that the previous behavior is pretty buggy
however and that it's unlikely anyone was relying upon it.
Additionally, a new parameter has been added
:paramref:`.Table.tometadata.referred_schema_fn`. This refers to a
callable function which will be used to determine the new referred
schema for any :class:`.ForeignKeyConstraint` encountered in the
tometadata operation. This callable can be used to revert to the
previous behavior or to customize how referred schemas are treated
on a per-constraint basis. [ticket:2913]
- rework the tests in test.sql.test_metadata, all the "tometadata" tests
now under new class ToMetaDataTest
Diffstat (limited to 'lib/sqlalchemy/engine')
0 files changed, 0 insertions, 0 deletions