feature: add checklist
This commit is contained in:
@ -0,0 +1,6 @@
|
||||
ALTER TABLE task_label DROP CONSTRAINT task_label_task_id_fkey;
|
||||
ALTER TABLE task_label
|
||||
ADD CONSTRAINT task_label_task_id_fkey
|
||||
FOREIGN KEY (task_id)
|
||||
REFERENCES task(task_id)
|
||||
ON DELETE CASCADE;
|
@ -0,0 +1,6 @@
|
||||
ALTER TABLE task_assigned DROP CONSTRAINT task_assigned_task_id_fkey;
|
||||
ALTER TABLE task_assigned
|
||||
ADD CONSTRAINT task_assigned_task_id_fkey
|
||||
FOREIGN KEY (task_id)
|
||||
REFERENCES task(task_id)
|
||||
ON DELETE CASCADE;
|
@ -0,0 +1,6 @@
|
||||
ALTER TABLE task DROP CONSTRAINT task_task_group_id_fkey;
|
||||
ALTER TABLE task
|
||||
ADD CONSTRAINT task_task_group_id_fkey
|
||||
FOREIGN KEY (task_group_id)
|
||||
REFERENCES task_group(task_group_id)
|
||||
ON DELETE CASCADE;
|
@ -0,0 +1 @@
|
||||
ALTER TABLE task ADD COLUMN complete boolean NOT NULL DEFAULT FALSE;
|
7
api/migrations/0029_add-task_checklist.up.sql
Normal file
7
api/migrations/0029_add-task_checklist.up.sql
Normal file
@ -0,0 +1,7 @@
|
||||
CREATE TABLE task_checklist (
|
||||
task_checklist_id uuid PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||
task_id uuid NOT NULL REFERENCES task(task_id) ON DELETE CASCADE,
|
||||
created_at timestamptz NOT NULL,
|
||||
name text NOT NULL,
|
||||
position float NOT NULL
|
||||
);
|
9
api/migrations/0030_add-task_checklist_item.up.sql
Normal file
9
api/migrations/0030_add-task_checklist_item.up.sql
Normal file
@ -0,0 +1,9 @@
|
||||
CREATE TABLE task_checklist_item (
|
||||
task_checklist_item_id uuid PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||
task_checklist_id uuid NOT NULL REFERENCES task_checklist(task_checklist_id) ON DELETE CASCADE,
|
||||
created_at timestamptz NOT NULL,
|
||||
complete boolean NOT NULL DEFAULT false,
|
||||
name text NOT NULL,
|
||||
position float NOT NULL,
|
||||
due_date timestamptz
|
||||
);
|
Reference in New Issue
Block a user