- N1.1: POST /notifications/push/subscribe, PushService, migration 090 - N1.2: Send Web Push on follow/like/comment/message via CreateNotification - N1.3: GET/PUT /notifications/preferences, migration 093 - Shared NotificationService with PushService for profile, track, comment handlers - Fix MockSocialService GetGlobalFeed, GetTrendingHashtags for tests
13 lines
608 B
SQL
13 lines
608 B
SQL
-- Migration 093: Notification preferences for Web Push (v0.302 Lot N1.3)
|
|
-- User preferences for which notification types trigger browser push
|
|
|
|
CREATE TABLE IF NOT EXISTS notification_preferences (
|
|
user_id UUID PRIMARY KEY REFERENCES users(id) ON DELETE CASCADE,
|
|
push_follow BOOLEAN NOT NULL DEFAULT true,
|
|
push_like BOOLEAN NOT NULL DEFAULT true,
|
|
push_comment BOOLEAN NOT NULL DEFAULT true,
|
|
push_message BOOLEAN NOT NULL DEFAULT true,
|
|
push_mention BOOLEAN NOT NULL DEFAULT true,
|
|
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
|
|
updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
|
|
);
|