nidus-sync/migrations/00010_add_notification.sql
Eli Ribble a2e67e3d60
Add oauth token failure model and notification
This will allow me to mark when an oauth token fails and surface it to
the user so that they can re-up on their auth token.
2025-11-11 20:10:56 +00:00

16 lines
296 B
SQL

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