15 lines
421 B
SQL
15 lines
421 B
SQL
CREATE TABLE IF NOT EXISTS user_app_notify (
|
|
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
|
"user" UUID NOT NULL,
|
|
title TEXT NOT NULL,
|
|
body TEXT NOT NULL,
|
|
notify_type TEXT NOT NULL,
|
|
target_type TEXT,
|
|
target_id UUID,
|
|
metadata TEXT,
|
|
read_at TIMESTAMPTZ,
|
|
archived_at TIMESTAMPTZ,
|
|
created_at TIMESTAMPTZ NOT NULL DEFAULT now(),
|
|
updated_at TIMESTAMPTZ NOT NULL DEFAULT now()
|
|
);
|