]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
- backport unique constraints reflection to 0.8.4, thereby
authorRoman Podolyaka <roman.podolyaka@gmail.com>
Sun, 9 Jun 2013 16:07:00 +0000 (19:07 +0300)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 3 Dec 2013 19:59:50 +0000 (14:59 -0500)
commite8458ab96b1bda5f139d34a24808167dd1f590c6
tree057aa46be1a157847ce081b88f7ef78cc9cb4e94
parentf2f54e04a54be79dea054ebede72befdd0dd4b6c
- backport unique constraints reflection to 0.8.4, thereby
assisting with alembic installations that have upgraded and are dealing with
PG index/unique constraint reflection.

Inspection API already supports reflection of table
indexes information and those also include unique
constraints (at least for PostgreSQL and MySQL).
But it could be actually useful to distinguish between
indexes and plain unique constraints (though both are
implemented in the same way internally in RDBMS).

This change adds a new method to Inspection API - get_unique_constraints()
and implements it for SQLite, PostgreSQL and MySQL dialects.
doc/build/changelog/changelog_08.rst
lib/sqlalchemy/dialects/mysql/base.py
lib/sqlalchemy/dialects/postgresql/base.py
lib/sqlalchemy/dialects/sqlite/base.py
lib/sqlalchemy/engine/interfaces.py
lib/sqlalchemy/engine/reflection.py
test/engine/test_reflection.py