]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- tweaks regarding the use_alter update
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 13 Mar 2015 20:22:01 +0000 (16:22 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 13 Mar 2015 20:22:01 +0000 (16:22 -0400)
doc/build/orm/relationship_persistence.rst
lib/sqlalchemy/exc.py

index 6d2ba78823c3917038daaa3271584b7e70c8c124..8af96cbd6d8d1c49a35a27d1622480298502dcd6 100644 (file)
@@ -56,8 +56,7 @@ have been INSERTED; it also causes the rows to be de-associated with
 each other via UPDATE before a DELETE is emitted.  The flag should
 be placed on just *one* of the relationships, preferably the
 many-to-one side.  Below we illustrate
-a complete example, including two :class:`.ForeignKey` constructs, one which
-specifies :paramref:`~.ForeignKey.use_alter` to help with emitting CREATE TABLE statements::
+a complete example, including two :class:`.ForeignKey` constructs::
 
     from sqlalchemy import Integer, ForeignKey, Column
     from sqlalchemy.ext.declarative import declarative_base
@@ -77,7 +76,6 @@ specifies :paramref:`~.ForeignKey.use_alter` to help with emitting CREATE TABLE
         widget_id = Column(Integer, primary_key=True)
         favorite_entry_id = Column(Integer,
                                 ForeignKey('entry.entry_id',
-                                use_alter=True,
                                 name="fk_favorite_entry"))
         name = Column(String(50))
 
@@ -145,7 +143,7 @@ as illustrated below::
             ForeignKeyConstraint(
                 ["widget_id", "favorite_entry_id"],
                 ["entry.widget_id", "entry.entry_id"],
-                name="fk_favorite_entry", use_alter=True
+                name="fk_favorite_entry"
             ),
         )
 
index c0d51382ddba6151f2128a5b9e27e6733ce96e70..9b27436b3064ac6c543f869601707032078e84ff 100644 (file)
@@ -54,8 +54,7 @@ class CircularDependencyError(SQLAlchemyError):
       or pre-deassociate one of the foreign key constrained values.
       The ``post_update`` flag described at :ref:`post_update` can resolve
       this cycle.
-    * In a :meth:`.MetaData.create_all`, :meth:`.MetaData.drop_all`,
-      :attr:`.MetaData.sorted_tables` operation, two :class:`.ForeignKey`
+    * In a :attr:`.MetaData.sorted_tables` operation, two :class:`.ForeignKey`
       or :class:`.ForeignKeyConstraint` objects mutually refer to each
       other.  Apply the ``use_alter=True`` flag to one or both,
       see :ref:`use_alter`.