veza/veza-backend-api/migrations/941_notification_prefs_defaults_v0105.sql
senke dd23805401 feat(v0.10.5): Notifications Complètes (F551-F555)
- Phase 1: Default prefs — push_message & push_follow only; migration 941
- Phase 2: Digest = new tracks from followed artists (ORIGIN §8.1), not unread notifications
- Phase 3: Toggle 'désactiver marketing' + button 'Tout désactiver sauf messages et follows'
- Phase 4: PushPreferencesSection first in NotificationSettings (source of truth)
- Roadmap: v0.10.5 → DONE
2026-03-10 10:09:32 +01:00

15 lines
968 B
SQL

-- Migration 941: v0.10.5 — Notification preferences defaults
-- Par défaut : push_message et push_follow activés ; likes/commentaires/mentions désactivés (anti-FOMO)
ALTER TABLE notification_preferences
ALTER COLUMN push_follow SET DEFAULT true,
ALTER COLUMN push_message SET DEFAULT true,
ALTER COLUMN push_like SET DEFAULT false,
ALTER COLUMN push_comment SET DEFAULT false,
ALTER COLUMN push_mention SET DEFAULT false;
COMMENT ON COLUMN notification_preferences.push_follow IS 'v0.10.5: default true — new followers';
COMMENT ON COLUMN notification_preferences.push_message IS 'v0.10.5: default true — direct messages';
COMMENT ON COLUMN notification_preferences.push_like IS 'v0.10.5: default false — engagement (opt-in)';
COMMENT ON COLUMN notification_preferences.push_comment IS 'v0.10.5: default false — engagement (opt-in)';
COMMENT ON COLUMN notification_preferences.push_mention IS 'v0.10.5: default false — mentions (opt-in)';