From 281aba5cf728fb35f1e1287d4dc56148cc20d6cb Mon Sep 17 00:00:00 2001 From: Kristina Fefelova Date: Mon, 2 Dec 2024 20:26:19 +0400 Subject: [PATCH] Replace personal read with timestamp Signed-off-by: Kristina Fefelova --- packages/postgres/migrations/04_notification.sql | 3 --- .../postgres/migrations/05_notificationContext.sql | 11 ++++++----- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/packages/postgres/migrations/04_notification.sql b/packages/postgres/migrations/04_notification.sql index 990e1e51ff..96b53f1a6d 100644 --- a/packages/postgres/migrations/04_notification.sql +++ b/packages/postgres/migrations/04_notification.sql @@ -3,8 +3,5 @@ CREATE TABLE IF NOT EXISTS notification social_id VARCHAR(255) NOT NULL, message_id INT8 NOT NULL, - read BOOLEAN NOT NULL DEFAULT false, - archived BOOLEAN NOT NULL DEFAULT false, - PRIMARY KEY (social_id, message_id) ); diff --git a/packages/postgres/migrations/05_notificationContext.sql b/packages/postgres/migrations/05_notificationContext.sql index ca8137a4c3..f8936f24cc 100644 --- a/packages/postgres/migrations/05_notificationContext.sql +++ b/packages/postgres/migrations/05_notificationContext.sql @@ -1,11 +1,12 @@ CREATE TABLE IF NOT EXISTS notification_context ( - workspace_id UUID NOT NULL, - card_id UUID NOT NULL, - huly_id VARCHAR(255) NOT NULL, /* Or maybe account id or something else */ + workspace_id UUID NOT NULL, + card_id UUID NOT NULL, + huly_id VARCHAR(255) NOT NULL, /* Or maybe account id or something else */ - last_view TIMESTAMPTZ, - last_update TIMESTAMPTZ, + archived_from TIMESTAMPTZ, + last_view TIMESTAMPTZ, + last_update TIMESTAMPTZ, PRIMARY KEY (workspace_id, card_id, huly_id) );