Skip to content

Updating the ERD

This page outlines how to view, edit, and propose changes to the People Depot entity relationship diagram (ERD), which is managed using dbdiagram.io.

📌 Purpose

To ensure database schema edits are collaborative, auditable, and synchronized with the source of truth, all edits must go through GitHub via a structured process described below.

🔍 Viewing the Live ERD

To view the current version of the ERD:

  • Visit: Live ERD (dbdiagram.io)link

Note

📝 You do not need an account to view the ERD

✏️ How to Propose Changes to the ERD

All edits must be submitted via pull request using the steps below.

  1. Fork the Repository

    1. Navigate to the People Depot GitHub repo
    2. Click Fork

    Note

    Ensure your fork is up-to-date before making changes

  2. Copy the Schema Source

    1. Locate the file: schema.dbml in the root folder
    2. Copy the entire contents of the file
  3. Make edits on dbdiagram.io (Your Account)

    1. Sign in to dbdiagram.io using your own free account
    2. Create a new diagram
    3. Paste the contents of schema.dbml into the editor
    4. Make your proposed changes using DBML syntax
    5. Ensure the diagram renders correctly
  4. Export Updated Schema

    • Once edits are complete and validated visually:
      1. Click Export
      2. Choose DBML
      3. Save the file as schema.dbml
  5. Commit & Push Changes

    • In your forked repo:
      1. Replace the original schema.dbml file with your updated version
      2. Commit your changes with a descriptive message (e.g., Add table for program milestones)
      3. Push to your fork
  6. Submit a Pull Request

    1. Open a PR from your fork to the main branch of PeopleDepot
    2. Title your PR descriptively (e.g., Update ERD to include new Program table)
    3. In the PR body, explain:
      1. What you changed
      2. Why you changed it
      3. Anything reviewers should double-check (e.g., table relationships, naming consistency)

✅ After Your PR Is Merged

Once your PR is approved and merged:

  1. A maintainer will manually update the official ERD on dbdiagram.io under the PeopleDepot@hackforla.org account using your submitted schema.dbml file.
  2. The Live ERD link will reflect your changes shortly after.

Note

You will not be given access to the shared dbdiagram.io account.

All official updates are uploaded by maintainers.


🛠 Tips and Conventions

  • Use clear, singular table names (e.g., Person, not People)
  • Always define primary keys and foreign keys
  • Maintain consistent naming conventions (e.g., snake_case or camelCase, as established)
  • Include comments in DBML for any complex relationships or logic

🧠 Resources