diff options
Diffstat (limited to 'doc/source/changeset.rst')
-rw-r--r-- | doc/source/changeset.rst | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/doc/source/changeset.rst b/doc/source/changeset.rst index d65a326..8aa8307 100644 --- a/doc/source/changeset.rst +++ b/doc/source/changeset.rst @@ -189,30 +189,30 @@ The following rundowns are true for all constraints classes: cons = PrimaryKeyConstraint('id', 'num', table=self.table) - # Create the constraint - cons.create() + # Create the constraint + cons.create() - # Drop the constraint - cons.drop() + # Drop the constraint + cons.drop() You can also pass in :class:`~sqlalchemy.schema.Column` objects (and table argument can be left out): .. code-block:: python - cons = PrimaryKeyConstraint(col1, col2) + cons = PrimaryKeyConstraint(col1, col2) #. Some dialects support ``CASCADE`` option when dropping constraints: .. code-block:: python - cons = PrimaryKeyConstraint(col1, col2) + cons = PrimaryKeyConstraint(col1, col2) - # Create the constraint - cons.create() + # Create the constraint + cons.create() - # Drop the constraint - cons.drop(cascade=True) + # Drop the constraint + cons.drop(cascade=True) .. note:: SQLAlchemy Migrate will try to guess the name of the constraints for |