Files
CoHaiSe-CLOUD/backend/cloud/migrations/005_storage_location_realign.sql
T
Esiah cc397e96d8
PR — Ouverture automatique / create-pr (push) Failing after 1s
chore: initial import of CoHaiSe Cloud
Standalone files & media application: React/Vite frontend with the @cohaise/ui design system, Hono + MariaDB backend, nginx reverse proxy, Docker Compose stack, migrations 000-006, and project docs.

Adds Gitea Actions workflows for deployment, automatic pull requests, and Renovate dependency updates.
2026-10-14 15:24:06 +02:00

26 lines
1.0 KiB
SQL

-- 005_storage_location_realign.sql
--
-- 002 seedait mount_path='/srv/cohaise/cloud' et quota_bytes=429496729600.
-- L'etat reel du deploiement s'en est ecarte sur les deux points :
--
-- * mount_path doit designer le point de montage reel du conteneur, sans
-- quoi le diagnostic depuis l'interieur (ou une liberation d'espace) vise
-- un chemin qui n'existe pas ;
-- * quota_bytes vaut 4096 octets, ce qui rend impossible tout envoi
-- reel puisque storage_locations.used_bytes est borne par cette valeur.
--
-- Les donnees deja posees ne sont pas modifiees : 002 reste tel quel, et ce
-- fichier corrige l'etat observe une fois pour toutes.
UPDATE storage_locations
SET mount_path = '/data/media',
quota_bytes = 429496729600
WHERE slug = 'principal';
-- Garde-fou : si un emplacement actif ne porte pas de quota, il doit au
-- minimum accueillir le plus grand fichier admis par un compte.
UPDATE storage_locations
SET quota_bytes = 429496729600
WHERE quota_bytes IS NULL
OR quota_bytes < 5368709120;