zzzeek/sqlalchemy — pull request #4 by malor (2013-06-09 20:14:54+00:00)
Title: Add basic support of unique constraints 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.

Unfortunately, MySQL doesn't allow to distinguish between a unique index and
a unique constraint but this should not be a major flaw.

Partially fixes issue #1443.