課題

https://separated-rover-67e.notion.site/1-1ad80412802b427d90e3ea43632056df

テーブル設計

ER図

https://dbdiagram.io/d/66e2d5a46dde7f4149e6c638

image.png

カラム名 データ型 説明
id int 主キー
account_name varchar Slackのユーザー名
slack_id varchar SlackのユーザID
created_at timestamp 作成日時
カラム名 データ型 説明
id int 主キー
regist_user_id int リマインドを登録したユーザーのID
receive_user_id int リマインドを受け取るユーザーのID
remind_message varchar リマインドの内容
cycle_message varchar リマインド周期の文字列(every 3 hours, every 1 daysなど)
created_at timestamp 作成日時
カラム名 データ型 説明
reminder_id int 外部キー、remindersのid
scheduled_at timestamp リマインド実行時刻
カラム名 データ型 説明
reminder_id int 外部キー、remindersのid
completed_at timestamp 完了時刻

クエリ

DDL - テーブルの作成

https://github.com/kmishima16/praha/blob/main/db_modeling_4/docker-mysql/script/01_DDL.sql

DML - レコードのINSERT

https://github.com/kmishima16/praha/blob/main/db_modeling_4/docker-mysql/script/02_DML.sql