-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
59 additions
and
0 deletions.
There are no files selected for viewing
59 changes: 59 additions & 0 deletions
59
migrations/schemas/20240322145850-remove_schedules_tabls.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
-- +migrate Up | ||
DROP TABLE schedule_discord_events; | ||
DROP TABLE schedule_google_calendars; | ||
DROP TABLE schedule_notion_pages; | ||
DROP TABLE schedules; | ||
|
||
-- +migrate Down | ||
CREATE TABLE schedules ( | ||
id UUID PRIMARY KEY DEFAULT (UUID()), | ||
deleted_at TIMESTAMP(6), | ||
created_at TIMESTAMP(6) DEFAULT (NOW()), | ||
updated_at TIMESTAMP(6) DEFAULT (NOW()), | ||
synced_at TIMESTAMP(6) DEFAULT (NOW()), | ||
|
||
name TEXT, | ||
description TEXT, | ||
start_time TIMESTAMP(6), | ||
end_time TIMESTAMP(6), | ||
schedule_type TEXT | ||
); | ||
|
||
CREATE TABLE schedule_google_calendars ( | ||
id UUID PRIMARY KEY DEFAULT (UUID()), | ||
deleted_at TIMESTAMP(6), | ||
created_at TIMESTAMP(6) DEFAULT (NOW()), | ||
updated_at TIMESTAMP(6) DEFAULT (NOW()), | ||
|
||
schedule_id UUID REFERENCES schedules(id), | ||
google_calendar_id TEXT, | ||
description TEXT, | ||
hangout_link TEXT | ||
); | ||
|
||
CREATE TABLE schedule_discord_events ( | ||
id UUID PRIMARY KEY DEFAULT (UUID()), | ||
deleted_at TIMESTAMP(6), | ||
created_at TIMESTAMP(6) DEFAULT (NOW()), | ||
updated_at TIMESTAMP(6) DEFAULT (NOW()), | ||
|
||
schedule_id UUID REFERENCES schedules(id), | ||
discord_event_id TEXT, | ||
description TEXT, | ||
voice_channel_id TEXT | ||
); | ||
|
||
CREATE TABLE schedule_notion_pages ( | ||
id UUID PRIMARY KEY DEFAULT (UUID()), | ||
deleted_at TIMESTAMP(6), | ||
created_at TIMESTAMP(6) DEFAULT (NOW()), | ||
updated_at TIMESTAMP(6) DEFAULT (NOW()), | ||
|
||
schedule_id UUID REFERENCES schedules(id), | ||
notion_page_id TEXT, | ||
description TEXT | ||
); | ||
|
||
|
||
|
||
|