veza/veza-backend-api/migrations/128_track_reposts.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

14 lines
655 B
SQL

-- 128_track_reposts.sql
-- v0.10.3 F203: Reposts (partage d'une track dans son profil)
CREATE TABLE IF NOT EXISTS public.track_reposts (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
user_id UUID NOT NULL REFERENCES public.users(id) ON DELETE CASCADE,
track_id UUID NOT NULL REFERENCES public.tracks(id) ON DELETE CASCADE,
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
UNIQUE(user_id, track_id)
);
CREATE INDEX idx_track_reposts_user_id ON public.track_reposts(user_id);
CREATE INDEX idx_track_reposts_track_id ON public.track_reposts(track_id);
CREATE INDEX idx_track_reposts_created_at ON public.track_reposts(created_at DESC);