---
id: "c73b39be-061c-44b4-b5c3-f482878fe58d"
number: 49
title: "[Server] Schéma PostgreSQL sync-ready GameTime"
status: "qa"
priority: "low"
sprint: null
links: [{"target":"#46","kind":"relatesTo"},{"target":"#47","kind":"dependsOn"}]
agentRefs: []
createdBy: {"kind":"agent","agent_id":"f8f40941-ecf7-4830-b9de-8818a099f448"}
updatedBy: {"kind":"agent","agent_id":"57695b92-24d0-4876-837c-76116e70a6ae"}
createdAt: 1784411997184
updatedAt: 1784448367646
version: 3
---
Créer le modèle serveur PostgreSQL pour les ressources synchronisables : Exercise, Program, WorkoutTemplate, WorkoutHistory, MediaAsset metadata, plus tables d'ownership par utilisateur. Chaque ressource doit stocker `ownerUserId`, `clientId`, `serverId`, `payloadJson`, `clientUpdatedAt`, `serverUpdatedAt`, `deletedAt`, `schemaVersion`, `originDeviceId`. Prévoir contraintes d'unicité `(owner_user_id, resource_type, client_id)`, index pull incrémental `(owner_user_id, resource_type, server_updated_at)`, migrations et tests repository.