<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/sqlalchemy.git/test/sql/test_metadata.py, branch pr/67</title>
<subtitle>github.com: zzzeek/sqlalchemy.git
</subtitle>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/sqlalchemy.git/'/>
<entry>
<title>- The behavior of :meth:`.Table.tometadata` has been adjusted such that</title>
<updated>2014-02-02T19:37:43+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2014-02-02T19:37:43+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=2d4b457924fa722ef2cf854d8287b9f2f1b51282'/>
<id>2d4b457924fa722ef2cf854d8287b9f2f1b51282</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>- Added a new feature which allows automated naming conventions to be</title>
<updated>2014-02-01T23:21:04+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2014-02-01T23:21:04+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=5b0919f3f5c7678c587858a47e38acd4a5b82f25'/>
<id>5b0919f3f5c7678c587858a47e38acd4a5b82f25</id>
<content type='text'>
applied to :class:`.Constraint` and :class:`.Index` objects.  Based
on a recipe in the wiki, the new feature uses schema-events to set up
names as various schema objects are associated with each other.  The
events then expose a configuration system through a new argument
:paramref:`.MetaData.naming_convention`.  This system allows production
of both simple and custom naming schemes for constraints and indexes
on a per-:class:`.MetaData` basis.  [ticket:2923]

commit 7e65e52c086652de3dd3303c723f98f09af54db8
Author: Mike Bayer &lt;mike_mp@zzzcomputing.com&gt;
Date:   Sat Feb 1 15:09:04 2014 -0500

    - first pass at new naming approach
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
applied to :class:`.Constraint` and :class:`.Index` objects.  Based
on a recipe in the wiki, the new feature uses schema-events to set up
names as various schema objects are associated with each other.  The
events then expose a configuration system through a new argument
:paramref:`.MetaData.naming_convention`.  This system allows production
of both simple and custom naming schemes for constraints and indexes
on a per-:class:`.MetaData` basis.  [ticket:2923]

commit 7e65e52c086652de3dd3303c723f98f09af54db8
Author: Mike Bayer &lt;mike_mp@zzzcomputing.com&gt;
Date:   Sat Feb 1 15:09:04 2014 -0500

    - first pass at new naming approach
</pre>
</div>
</content>
</entry>
<entry>
<title>- simplify the mechanics of PrimaryKeyConstraint with regards to reflection;</title>
<updated>2014-01-20T23:06:18+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2014-01-20T22:55:01+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=49f1807f8f2acea5494fa77d217dce813a933147'/>
<id>49f1807f8f2acea5494fa77d217dce813a933147</id>
<content type='text'>
reflection now updates the PKC in place.
- support the use case of the empty PrimaryKeyConstraint in order to specify
constraint options; the columns marked as primary_key=True will now be gathered
into the columns collection, rather than being ignored. [ticket:2910]
- add validation such that column specification should only take place
in the PrimaryKeyConstraint directly, or by using primary_key=True flags;
if both are present, they have to match exactly, otherwise the condition is
assumed to be ambiguous, and a warning is emitted; the old behavior of
using the PKC columns only is maintained.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
reflection now updates the PKC in place.
- support the use case of the empty PrimaryKeyConstraint in order to specify
constraint options; the columns marked as primary_key=True will now be gathered
into the columns collection, rather than being ignored. [ticket:2910]
- add validation such that column specification should only take place
in the PrimaryKeyConstraint directly, or by using primary_key=True flags;
if both are present, they have to match exactly, otherwise the condition is
assumed to be ambiguous, and a warning is emitted; the old behavior of
using the PKC columns only is maintained.
</pre>
</div>
</content>
</entry>
<entry>
<title>- alter behavior such that dialect_kwargs is still immutable, but</title>
<updated>2014-01-19T21:32:36+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2014-01-19T21:32:36+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=3dc9f9b3db10254f688c6b25b58951a4b1d4a41b'/>
<id>3dc9f9b3db10254f688c6b25b58951a4b1d4a41b</id>
<content type='text'>
now represents exactly the kwargs that were passed, and not the defaults.
the defaults are still in dialect_options.  This allows repr() schemes such as that
of alembic to not need to look through and compare for defaults.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
now represents exactly the kwargs that were passed, and not the defaults.
the defaults are still in dialect_options.  This allows repr() schemes such as that
of alembic to not need to look through and compare for defaults.
</pre>
</div>
</content>
</entry>
<entry>
<title>- some test fixes</title>
<updated>2014-01-19T05:34:37+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2014-01-19T05:34:37+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=8e1a4fdced253a58af309c93c24a8a492b646bb7'/>
<id>8e1a4fdced253a58af309c93c24a8a492b646bb7</id>
<content type='text'>
- clean up some shenanigans in reflection
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- clean up some shenanigans in reflection
</pre>
</div>
</content>
</entry>
<entry>
<title>- implement kwarg validation and type system for dialect-specific</title>
<updated>2014-01-19T00:26:56+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2014-01-19T00:26:56+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=1af8e2491dcbed723d2cdafd44fd37f1a6908e91'/>
<id>1af8e2491dcbed723d2cdafd44fd37f1a6908e91</id>
<content type='text'>
arguments; [ticket:2866]
- add dialect specific kwarg functionality to ForeignKeyConstraint, ForeignKey
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
arguments; [ticket:2866]
- add dialect specific kwarg functionality to ForeignKeyConstraint, ForeignKey
</pre>
</div>
</content>
</entry>
<entry>
<title>- The :class:`.ForeignKey` class more aggressively checks the given</title>
<updated>2013-12-12T00:48:27+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2013-12-12T00:48:27+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=84af7e6c22100ef26c5a27185b1d270f5afb3370'/>
<id>84af7e6c22100ef26c5a27185b1d270f5afb3370</id>
<content type='text'>
column argument.   If not a string, it checks that the object is
at least a :class:`.ColumnClause`, or an object that resolves to one,
and that the ``.table`` attribute, if present, refers to a
:class:`.TableClause` or subclass, and not something like an
:class:`.Alias`.  Otherwise, a :class:`.ArgumentError` is raised.
[ticket:2883]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
column argument.   If not a string, it checks that the object is
at least a :class:`.ColumnClause`, or an object that resolves to one,
and that the ``.table`` attribute, if present, refers to a
:class:`.TableClause` or subclass, and not something like an
:class:`.Alias`.  Otherwise, a :class:`.ArgumentError` is raised.
[ticket:2883]
</pre>
</div>
</content>
</entry>
<entry>
<title>- The :meth:`.Table.tometadata` method now produces copies of</title>
<updated>2013-10-19T00:01:45+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2013-10-19T00:01:45+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=73669c7284548d0e5ab2147f66174c301e732650'/>
<id>73669c7284548d0e5ab2147f66174c301e732650</id>
<content type='text'>
all :attr:`.SchemaItem.info` dictionaries from all :class:`.SchemaItem`
objects within the structure including columns, constraints,
foreign keys, etc.   As these dictionaries
are copies, they are independent of the original dictionary.
Previously, only the ``.info`` dictionary of :class:`.Column` was transferred
within this operation, and it was only linked in place, not copied.
[ticket:2716]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
all :attr:`.SchemaItem.info` dictionaries from all :class:`.SchemaItem`
objects within the structure including columns, constraints,
foreign keys, etc.   As these dictionaries
are copies, they are independent of the original dictionary.
Previously, only the ``.info`` dictionary of :class:`.Column` was transferred
within this operation, and it was only linked in place, not copied.
[ticket:2716]
</pre>
</div>
</content>
</entry>
<entry>
<title>The ``.unique`` flag on :class:`.Index` could be produced as ``None``</title>
<updated>2013-10-14T18:53:28+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2013-10-14T18:53:28+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=78a38967c4ad94194308f77f60a922236cd75227'/>
<id>78a38967c4ad94194308f77f60a922236cd75227</id>
<content type='text'>
if it was generated from a :class:`.Column` that didn't specify ``unique``
(where it defaults to ``None``).  The flag will now always be ``True`` or
``False``. [ticket:2825]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
if it was generated from a :class:`.Column` that didn't specify ``unique``
(where it defaults to ``None``).  The flag will now always be ``True`` or
``False``. [ticket:2825]
</pre>
</div>
</content>
</entry>
<entry>
<title>The "name" attribute is set on :class:`.Index` before the "attach"</title>
<updated>2013-10-11T19:55:57+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2013-10-11T19:55:57+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=9d38ed33400adf3ba8fdf3af49f26de1270bbe23'/>
<id>9d38ed33400adf3ba8fdf3af49f26de1270bbe23</id>
<content type='text'>
events are called, so that attachment events can be used to dynamically
generate a name for the index based on the parent table and/or
columns. [ticket:2835]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
events are called, so that attachment events can be used to dynamically
generate a name for the index based on the parent table and/or
columns. [ticket:2835]
</pre>
</div>
</content>
</entry>
</feed>
