nidus-sync/migrations/00010_add_notification.sql
Eli Ribble bf3dedf7cd
Pull notifications from the database
Previously we were storing them, just not showing them.
2025-11-11 22:53:48 +00:00

17 lines
379 B
SQL

-- +goose Up
CREATE TYPE NotificationType AS ENUM (
'oauth_token_invalidated');
CREATE TABLE notification (
id SERIAL PRIMARY KEY,
created TIMESTAMP WITHOUT TIME ZONE NOT NULL,
link TEXT NOT NULL,
message TEXT NOT NULL,
type NotificationType NOT NULL,
user_id INTEGER REFERENCES user_(id) NOT NULL);
-- +goose Down
DROP TABLE notification;
DROP TYPE NotificationType;