GitHub
Comprehensive database schema for a GitHub-like code hosting platform with user accounts, organizations, repositories, branches, commits, pull requests, code reviews, issues, labels, milestones, releases, stars, forks, and Actions workflows.
developer-toolsgitcollaborationopen-sourceci-cd
MySQL10 cols
Num
PK
AI
FK
Null
Physical Name
Type
Default
Comment
Unique user identifier
Unique GitHub username handle
User's primary email address
Hashed password for authentication
User's full display name
User profile biography
URL to profile avatar image
User's personal website URL
Account creation timestamp
Last profile update timestamp
IXUQCK|💬
MySQL9 cols
Num
PK
AI
FK
Null
Physical Name
Type
Default
Comment
Unique organization identifier
Organization username/handle
Organization display name
Organization description
Organization logo URL
Organization website URL
User who created the organization
Organization creation timestamp
Last update timestamp
IXUQCK|💬
MySQL6 cols
Num
PK
AI
FK
Null
Physical Name
Type
Default
Comment
Unique membership record identifier
Organization this member belongs to
Member user
Role: owner or member
When user joined the organization
Last role update timestamp
IXUQCK|💬
MySQL14 cols
Num
PK
AI
FK
Null
Physical Name
Type
Default
Comment
Unique repository identifier
User who owns this repository
Organization owner if org-owned
Repository name slug
Repository description
Whether repository is private
Whether this is a forked repository
Original repo if forked
Default branch name
Total number of stars
Total number of forks
Primary programming language
Repository creation timestamp
Last push or update timestamp
IXUQCK|💬
MySQL8 cols
Num
PK
AI
FK
Null
Physical Name
Type
Default
Comment
Unique branch identifier
Repository this branch belongs to
Branch name, e.g. main or feature/xyz
SHA of the latest commit on this branch
Whether branch has protection rules
Whether this is the default branch
Branch creation timestamp
Last update timestamp
IXUQCK|💬
MySQL11 cols
Num
PK
AI
FK
Null
Physical Name
Type
Default
Comment
Unique commit record identifier
Repository this commit belongs to
GitHub user who authored the commit
Full commit SHA hash
Commit message
Lines added in this commit
Lines deleted in this commit
Number of files changed
Branch this commit is on
Commit timestamp
Record creation timestamp
IXUQCK|💬
MySQL14 cols
Num
PK
AI
FK
Null
Physical Name
Type
Default
Comment
Unique pull request identifier
Repository this PR belongs to
User who opened the PR
PR number within the repository
Pull request title
PR description in Markdown
State: open, closed, or merged
Source branch name
Target branch name
Whether PR is a draft
Timestamp when PR was merged
User who merged the PR
PR creation timestamp
Last update timestamp
IXUQCK|💬
MySQL8 cols
Num
PK
AI
FK
Null
Physical Name
Type
Default
Comment
Unique review identifier
Pull request being reviewed
User who submitted the review
Review state: approved, changes_requested, commented
Review summary comment
When review was submitted
Record creation timestamp
Last update timestamp
IXUQCK|💬
MySQL12 cols
Num
PK
AI
FK
Null
Physical Name
Type
Default
Comment
Unique issue identifier
Repository this issue belongs to
User who opened the issue
Issue number within the repository
Issue title
Issue description in Markdown
State: open or closed
Associated milestone if any
Whether issue is locked for comments
Primary assigned user
Issue creation timestamp
Last update timestamp
IXUQCK|💬
MySQL7 cols
Num
PK
AI
FK
Null
Physical Name
Type
Default
Comment
Unique label identifier
Repository this label belongs to
Label display name
Hex color code for the label
Label description
Label creation timestamp
Last update timestamp
IXUQCK|💬
MySQL5 cols
Num
PK
AI
FK
Null
Physical Name
Type
Default
Comment
Unique issue-label junction identifier
Issue being labeled
Label applied to the issue
When label was applied
Last update timestamp
IXUQCK|💬
MySQL9 cols
Num
PK
AI
FK
Null
Physical Name
Type
Default
Comment
Unique milestone identifier
Repository this milestone belongs to
Milestone title
Milestone description
State: open or closed
Target completion date
When milestone was closed
Milestone creation timestamp
Last update timestamp
IXUQCK|💬
MySQL5 cols
Num
PK
AI
FK
Null
Physical Name
Type
Default
Comment
Unique star record identifier
User who starred the repo
Starred repository
When star was added
Last update timestamp
IXUQCK|💬
MySQL10 cols
Num
PK
AI
FK
Null
Physical Name
Type
Default
Comment
Unique release identifier
Repository this release belongs to
User who created the release
Git tag name, e.g. v1.0.0
Release display name
Release notes in Markdown
Whether release is a draft
Whether this is a prerelease
Release creation timestamp
When release was published
IXUQCK|💬
MySQL9 cols
Num
PK
AI
FK
Null
Physical Name
Type
Default
Comment
Unique workflow identifier
Repository this workflow belongs to
Workflow display name
Workflow YAML file path
State: active, disabled, deleted
Trigger event: push, pull_request, schedule
Workflow creation timestamp
Last update timestamp
Timestamp of most recent run
IXUQCK|💬
MySQL10 cols
Num
PK
AI
FK
Null
Physical Name
Type
Default
Comment
Unique workflow run identifier
Workflow that was triggered
User who triggered the run
Sequential run number per workflow
Status: queued, in_progress, completed
Conclusion: success, failure, cancelled, skipped
Branch name that triggered the run
Commit SHA that triggered the run
When run started executing
When run finished
IXUQCK|💬
Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.
Created with ERD Studio
Tables in this template
usersUsers
10 colsorganizationsOrganizations
9 colsorg_membersOrg Members
6 colsrepositoriesRepositories
14 colsbranchesBranches
8 colscommitsCommits
11 colspull_requestsPull Requests
14 colspr_reviewsPR Reviews
8 colsissuesIssues
12 colslabelsLabels
7 colsissue_labelsIssue Labels
5 colsmilestonesMilestones
9 colsstarsStars
5 colsreleasesReleases
10 colsactions_workflowsActions Workflows
9 colsactions_runsActions Runs
10 colsRelated Templates
View all templates →Netflix
CloneVideo streaming platform with content catalog, profiles, subscriptions, and recommendations
PostgreSQL15 tables
streamingvideosubscription+2
Web App
Spotify
CloneMusic streaming platform with tracks, artists, albums, playlists, and social features
PostgreSQL18 tables
musicstreamingplaylist+2
Web App
Discord
CloneCommunity platform with servers, channels, roles, voice, and bots
PostgreSQL15 tables
gamingcommunityvoice+2
Web App
Slack
CloneTeam messaging platform with workspaces, channels, threads, and integrations
PostgreSQL14 tables
messagingcollaborationteam+2
Web App