chore: perauset customer project
This commit is contained in:
13
sql/0008-notifications.sql
Normal file
13
sql/0008-notifications.sql
Normal file
@@ -0,0 +1,13 @@
|
||||
CREATE TABLE app.notification (
|
||||
notification_id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
||||
user_id UUID NOT NULL REFERENCES app."user"(user_id),
|
||||
type TEXT NOT NULL,
|
||||
title TEXT NOT NULL,
|
||||
body TEXT,
|
||||
entity_type TEXT,
|
||||
entity_id UUID,
|
||||
read_at TIMESTAMPTZ,
|
||||
created_at TIMESTAMPTZ NOT NULL DEFAULT now()
|
||||
);
|
||||
|
||||
CREATE INDEX idx_notification_user ON app.notification(user_id, read_at, created_at DESC);
|
||||
Reference in New Issue
Block a user