veza/veza-backend-api/migrations/127_moderation_keywords.sql
senke 6111ae6136
Some checks failed
Backend API CI / test-unit (push) Failing after 0s
Backend API CI / test-integration (push) Failing after 0s
Frontend CI / test (push) Failing after 0s
Storybook Audit / Build & audit Storybook (push) Failing after 0s
feat(v0.10.3): Commentaires & Interactions Sociales - F201-F215
- F201: Commentaires avec timestamp cliquable, modération mots-clés
- F202: Likes privés (compteur visible créateur uniquement)
- F203: Reposts de tracks sur le profil, bouton Repost, onglet Reposts
- F204: Notifications (commentaire, repost), pas de gamification

Backend: migrations 127/128, comment_moderation_service, track_repost_service,
  GetTrackLikes/GetTrack masquent like_count pour non-créateurs
Frontend: LikeButton isCreator, RepostButton, Reposts tab profil, timestamp seek
2026-03-09 10:30:47 +01:00

18 lines
757 B
SQL

-- 127_moderation_keywords.sql
-- v0.10.3 F201: Modération déterministe des commentaires par mots-clés (pas de ML)
CREATE TABLE IF NOT EXISTS public.moderation_keywords (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
word VARCHAR(50) NOT NULL,
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
UNIQUE(word)
);
CREATE INDEX idx_moderation_keywords_word ON public.moderation_keywords(LOWER(word));
-- Seed initial minimal (spam, insultes basiques, langues FR/EN)
INSERT INTO public.moderation_keywords (word) VALUES
('spam'), ('scam'), ('virus'), ('free money'), ('click here'),
('casino'), ('lottery'), ('winner'), ('nigerian'), ('pharma'),
('viagra'), ('crypto'), ('bitcoin'), ('nft'), ('mlm')
ON CONFLICT (word) DO NOTHING;