Skip to content

Show UNIQUE constraints and indexes on the diagram #9

Description

@JoseVelazcoH

Problem

UNIQUE constraints and indexes are important parts of a schema's semantics but are not visualized. A column with a unique constraint behaves differently from a plain nullable column, and this distinction matters when reading an ERD.

Proposed

  • Mark columns that participate in a UniqueConstraint with a small indicator (e.g. a U badge or underline) in both HTML and SVG renderers
  • Optionally list multi-column unique constraints as a footer row in the table card
  • Index visibility could be opt-in via show_indexes=True to avoid cluttering diagrams for schemas with many indexes

The data is available via table.constraints and table.indexes in SQLAlchemy metadata.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions