feat: add bell notification system for task assignment
This commit is contained in:
@ -16,3 +16,5 @@ CREATE TABLE notification_notified (
|
||||
read boolean NOT NULL DEFAULT false,
|
||||
read_at timestamptz
|
||||
);
|
||||
|
||||
CREATE INDEX idx_notification_pagination ON notification (created_on, notification_id);
|
||||
|
@ -10,7 +10,7 @@ CREATE TABLE account_setting (
|
||||
data_type text NOT NULL REFERENCES account_setting_data_type(data_type_id) ON DELETE CASCADE,
|
||||
constrained_default_value text
|
||||
REFERENCES account_setting_allowed_values(allowed_value_id) ON DELETE CASCADE,
|
||||
unconstrained_default_value text,
|
||||
unconstrained_default_value text
|
||||
);
|
||||
|
||||
INSERT INTO account_setting VALUES ('email_notification_frequency', true, 'string');
|
||||
@ -25,7 +25,7 @@ INSERT INTO account_setting_allowed_values (setting_id, item_value) VALUES (0, '
|
||||
INSERT INTO account_setting_allowed_values (setting_id, item_value) VALUES (0, 'hourly');
|
||||
INSERT INTO account_setting_allowed_values (setting_id, item_value) VALUES (0, 'instant');
|
||||
|
||||
CREATE TABLE account_setting (
|
||||
CREATE TABLE account_setting_value (
|
||||
account_setting_id uuid PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||
user_id uuid NOT NULL REFERENCES user_account(user_id) ON DELETE CASCADE,
|
||||
setting_id int NOT NULL REFERENCES account_setting(account_setting_id) ON DELETE CASCADE,
|
||||
|
6
migrations/0068_add-task_watcher-table.up.sql
Normal file
6
migrations/0068_add-task_watcher-table.up.sql
Normal file
@ -0,0 +1,6 @@
|
||||
CREATE TABLE task_watcher (
|
||||
task_watcher_id uuid PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||
task_id uuid NOT NULL REFERENCES task(task_id) ON DELETE CASCADE,
|
||||
user_id uuid NOT NULL REFERENCES user_account(user_id) ON DELETE CASCADE,
|
||||
watched_at timestamptz NOT NULL
|
||||
);
|
Reference in New Issue
Block a user