ERD Viewer

See your database as a diagram

Open a project's .sql files (migrations, schema, seed data), from this device or a GitHub repo. ERD Viewer reads the Postgres CREATE TABLE, ALTER TABLE and INSERT statements and draws the tables and how they connect.

Files are read in your browser and never uploaded. On a phone, use “Open from GitHub”, or “Choose .sql files” to pick them from Files or OneDrive.

Open a project

Every .sql file is read in name order (so numbered migrations run in sequence). node_modules and hidden folders are skipped. Files are read in your browser and never uploaded.

Open from GitHub

Paste a repo link, or a folder link from GitHub's address bar. Every .sql file in that folder and its subfolders is read.

How to make a read-only token
  1. Open GitHub → Settings → Developer settings → Fine-grained tokens → Generate new token.
  2. Name it “ERD Viewer” and pick an expiration date.
  3. Under Repository access, choose Only select repositories and pick the repos you want to view.
  4. Under Permissions → Repository permissions, set Contents to Read-only.
  5. Click Generate token, copy it and paste it above.

The token stays in this browser and is sent only to GitHub. Anyone using this browser could use it to read those repos, so give it access only to the repos you need.

Files

Files are read top to bottom. Untick a file to leave it out. Down and rollback migrations start unticked.