boardinghouse.backends.postgres.schema module

boardinghouse.backends.postgres.schema.get_constraints(cursor, table_name)[source]

Retrieves any constraints or keys (unique, pk, fk, check, index) across one or more columns.

This is copied (almost) verbatim from django, but replaces the use of “public” with “public” + “__template__”.

We assume that this will find the relevant constraint, and rely on our operations keeping the others in sync.