feat: add reviews, notifications, notes and account hardening
This commit is contained in:
14
server/migrations/019_notifications.sql
Normal file
14
server/migrations/019_notifications.sql
Normal file
@@ -0,0 +1,14 @@
|
||||
-- In-app notifications for questions and replies.
|
||||
create table if not exists notifications (
|
||||
id uuid primary key default gen_random_uuid(),
|
||||
user_id uuid not null references users(id) on delete cascade,
|
||||
kind text not null,
|
||||
title text not null,
|
||||
body text not null default '',
|
||||
href text not null,
|
||||
read_at timestamptz,
|
||||
created_at timestamptz not null default now()
|
||||
);
|
||||
|
||||
create index if not exists notifications_user_index on notifications (user_id, created_at desc);
|
||||
create index if not exists notifications_unread_index on notifications (user_id) where read_at is null;
|
||||
Reference in New Issue
Block a user