Shoulder.dev Logo Shoulder.dev

What is the database schema? - stefanprodan/timoni

Database Schema

Timoni uses a PostgreSQL database to store its data. The schema is designed to be flexible and extensible, allowing for the addition of new features and functionality. The database schema includes the following tables:

Table: applications

Columns:

Column Name Data Type Description
id uuid Unique identifier for the application
name text Name of the application
cluster text Cluster where the application is deployed
namespace text Namespace where the application is deployed
description text Description of the application
created_at timestamp with time zone Timestamp of when the application was created
updated_at timestamp with time zone Timestamp of when the application was last updated

Table: releases

Columns:

Column Name Data Type Description
id uuid Unique identifier for the release
application_id uuid Foreign key to the applications table
version text Version of the release
commit_sha text Commit SHA of the release
image text Image tag of the release
manifest jsonb Manifest of the release
created_at timestamp with time zone Timestamp of when the release was created

Table: metrics

Columns:

Column Name Data Type Description
id uuid Unique identifier for the metric
application_id uuid Foreign key to the applications table
release_id uuid Foreign key to the releases table
name text Name of the metric
value numeric Value of the metric
timestamp timestamp with time zone Timestamp of when the metric was collected

Table: events

Columns:

Column Name Data Type Description
id uuid Unique identifier for the event
application_id uuid Foreign key to the applications table
release_id uuid Foreign key to the releases table
type text Type of event
message text Message of the event
created_at timestamp with time zone Timestamp of when the event occurred

Table: users

Columns:

Column Name Data Type Description
id uuid Unique identifier for the user
username text Username of the user
email text Email address of the user
password text Password of the user
created_at timestamp with time zone Timestamp of when the user was created

Table: teams

Columns:

Column Name Data Type Description
id uuid Unique identifier for the team
name text Name of the team
description text Description of the team
created_at timestamp with time zone Timestamp of when the team was created

Table: team_members

Columns:

Column Name Data Type Description
id uuid Unique identifier for the team member
team_id uuid Foreign key to the teams table
user_id uuid Foreign key to the users table
created_at timestamp with time zone Timestamp of when the team member was created

Table: application_teams

Columns:

Column Name Data Type Description
id uuid Unique identifier for the application team
application_id uuid Foreign key to the applications table
team_id uuid Foreign key to the teams table
created_at timestamp with time zone Timestamp of when the application team was created

Reference: https://github.com/stefanprodan/timoni/blob/main/db/schema.sql

This database schema provides Timoni with the necessary data to manage applications, releases, metrics, events, users, and teams. It is designed to be flexible and extensible, allowing for the addition of new features and functionality in the future.