feat: redesign due date manager

This commit is contained in:
Jordan Knott
2021-11-05 22:35:57 -05:00
parent df6140a10f
commit 0d00fc7518
34 changed files with 2204 additions and 196 deletions

View File

@ -0,0 +1,15 @@
CREATE TABLE task_due_date_reminder_duration (
code text PRIMARY KEY
);
INSERT INTO task_due_date_reminder_duration VALUES ('MINUTE');
INSERT INTO task_due_date_reminder_duration VALUES ('HOUR');
INSERT INTO task_due_date_reminder_duration VALUES ('DAY');
INSERT INTO task_due_date_reminder_duration VALUES ('WEEK');
CREATE TABLE task_due_date_reminder (
due_date_reminder_id uuid PRIMARY KEY DEFAULT uuid_generate_v4(),
task_id uuid NOT NULL REFERENCES task(task_id) ON DELETE CASCADE,
period int NOT NULL,
duration text NOT NULL REFERENCES task_due_date_reminder_duration(code) ON DELETE CASCADE
);