diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-11-30 18:50:03 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-11-30 18:52:32 -0500 |
commit | 0a47420a6156cb21b5a00c3f8dabb1a809381576 (patch) | |
tree | 662d8898e61681befaf20a5b76cd83b3ca253fda /alembic/environment.py | |
parent | 96bbcf2542959b5b0dc99bbfb0db9a1db7072bc5 (diff) | |
download | alembic-0a47420a6156cb21b5a00c3f8dabb1a809381576.tar.gz |
- name the include_object hook "foreign_key_constraint"
- changelog and other doc updates, fixes #178
- fix drop_constraint() unit tests and add two more for FKs
Diffstat (limited to 'alembic/environment.py')
-rw-r--r-- | alembic/environment.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/alembic/environment.py b/alembic/environment.py index dab31e8..adf6ac6 100644 --- a/alembic/environment.py +++ b/alembic/environment.py @@ -486,16 +486,21 @@ class EnvironmentContext(object): as a :class:`~sqlalchemy.schema.Table`, :class:`~sqlalchemy.schema.Column`, :class:`~sqlalchemy.schema.Index` - or :class:`~sqlalchemy.schema.UniqueConstraint` object + :class:`~sqlalchemy.schema.UniqueConstraint`, + or :class:`~sqlalchemy.schema.ForeignKeyConstraint` object * ``name``: the name of the object. This is typically available via ``object.name``. * ``type``: a string describing the type of object; currently - ``"table"``, ``"column"``, ``"index"`` or ``"unique_constraint"``. + ``"table"``, ``"column"``, ``"index"``, ``"unique_constraint"``, + or ``"foreign_key_constraint"`` .. versionadded:: 0.7.0 Support for indexes and unique constraints within the :paramref:`~.EnvironmentContext.configure.include_object` hook. + .. versionadded:: 0.7.1 Support for foreign keys within the + :paramref:`~.EnvironmentContext.configure.include_object` hook. + * ``reflected``: ``True`` if the given object was produced based on table reflection, ``False`` if it's from a local :class:`.MetaData` object. |