Initial import
This commit is contained in:
16
etc/db/work-db/sql/notification-messages.sql
Executable file
16
etc/db/work-db/sql/notification-messages.sql
Executable file
@@ -0,0 +1,16 @@
|
||||
create table if not exists notification_messages (
|
||||
id serial primary key,
|
||||
title varchar(200) not null,
|
||||
body text not null,
|
||||
category varchar(60) not null default 'general',
|
||||
source varchar(80) not null default 'system',
|
||||
priority varchar(20) not null default 'normal',
|
||||
is_read boolean not null default false,
|
||||
read_at timestamptz null,
|
||||
metadata_json jsonb not null default '{}'::jsonb,
|
||||
created_at timestamptz not null default now(),
|
||||
updated_at timestamptz not null default now()
|
||||
);
|
||||
|
||||
create index if not exists idx_notification_messages_unread_created_at
|
||||
on notification_messages (is_read, created_at desc, id desc);
|
||||
Reference in New Issue
Block a user