Database Schema Diagram - davidgb8246/RapidRollout GitHub Wiki

📋 Database Schema Diagram (Relational Design)

Table: user_profile

Column Name Data Type Constraints
id UUID Primary Key
user_id FK to auth_user(id) Unique, Not Null, CASCADE on delete

Table: project

Column Name Data Type Constraints
id UUID Primary Key
profile_id FK to user_profile(id) Not Null, CASCADE on delete
name VARCHAR(255) Nullable
repository_url VARCHAR(255) Not Null
encrypted_secret BYTEA Nullable
encrypted_ssh_key BYTEA Nullable
initialized BOOLEAN Default false

Table: deployment

Column Name Data Type Constraints
id UUID Primary Key
project_id FK to project(id) Not Null, CASCADE on delete
commit_id VARCHAR(40) Nullable
commit_url VARCHAR(255) Not Null
status VARCHAR(20) Not Null, Default 'in_progress', Check in ['in_progress', 'completed', 'failed']
created_at TIMESTAMP Auto now add
updated_at TIMESTAMP Auto now

Table: deployment_status_message

Column Name Data Type Constraints
id UUID Primary Key
deployment_id FK to deployment(id) Not Null, CASCADE on delete
message TEXT Not Null
timestamp TIMESTAMP Auto now add

Table: private_file

Column Name Data Type Constraints
id UUID Primary Key
project_id FK to project(id) Not Null, CASCADE on delete
content BYTEA Nullable
filename VARCHAR(255) Not Null
filepath VARCHAR(1024) Nullable
fileperms VARCHAR(3) Default '600'
file_type VARCHAR(20) Not Null, Default 'DEFAULT', Check in ['DEFAULT', 'ENV', 'AFTER_START_SCRIPT']
created_at TIMESTAMP Auto now add
updated_at TIMESTAMP Auto now

🔗 Relationships Summary

  • UserProfile.user → One-to-One → User
  • Project.profile → Many-to-One → UserProfile
  • Deployment.project → Many-to-One → Project
  • DeploymentStatusMessage.deployment → Many-to-One → Deployment
  • PrivateFile.project → Many-to-One → Project