Skip to content

🚧 wip database schema - #6

Merged
thibaultleouay merged 5 commits into
mainfrom
init-database-schema
Jun 26, 2023
Merged

🚧 wip database schema#6
thibaultleouay merged 5 commits into
mainfrom
init-database-schema

Conversation

@thibaultleouay

Copy link
Copy Markdown
Member

No description provided.

@vercel

vercel Bot commented Jun 23, 2023

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
openstatus-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 26, 2023 7:22am

@thibaultleouay
thibaultleouay marked this pull request as ready for review June 25, 2023 15:35
@thibaultleouay
thibaultleouay requested a review from mxkaske June 25, 2023 15:35
Comment thread packages/db/src/schema/status-job.ts Outdated
Comment on lines +8 to +15
CREATE TABLE `incidentUpdate` (
`id` int AUTO_INCREMENT PRIMARY KEY NOT NULL,
`incident_date` datetime,
`title` varchar(256),
`message` text,
`incident_id` int NOT NULL,
`created_at` timestamp NOT NULL DEFAULT (now()),
`updated_at` timestamp NOT NULL ON UPDATE CURRENT_TIMESTAMP);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the purpose of the table?

We will have to store every single change of an incident. Could be interesting to use tinybird for that.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An incident in my mind was a set message you post when your service is down!
and the message is this table, an update to an incident


workspaceId: int("workspace_id").notNull(),

slug: varchar("slug", { length: 256 }), // which is used for https://slug.openstatus.dev

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should store the slug inside a workspace. So that every company has only a single status page with all the websites.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought we could have multiple page for a workspace :)

Comment thread packages/db/src/schema/status-job.ts Outdated
import { relations } from "drizzle-orm";
import { page } from "./page";

export const statusJob = mysqlTable("statusJob", {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hearing the name "status job" for the first time. Should we call it "ping"? I have something similar where I called it function monitor, but all are related to pinning a website.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep monitor makes sense!

@thibaultleouay
thibaultleouay merged commit c6f8e4d into main Jun 26, 2023
@thibaultleouay
thibaultleouay deleted the init-database-schema branch June 26, 2023 07:29
This was referenced Jan 26, 2026
RealTong pushed a commit to RealTong/openstatus that referenced this pull request Mar 18, 2026
* 🚧 wip database  schema

* 🚧 wip database  schema

* 🚧 wip database  schema

* 🚧 wip database  schema

* 🗃️update database
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants