feat: file dedup — content_hash SHA256 + /files/lookup API + auto-rename on name collision

This commit is contained in:
Accusys
2026-05-14 20:24:21 +08:00
parent 189bec929a
commit 4d1fe2d26f
5 changed files with 260 additions and 51 deletions

View File

@@ -0,0 +1,6 @@
-- Migration: Add content_hash column for file deduplication
-- Date: 2026-05-14
-- Usage: psql -U accusys -d momentry -f migrate_add_content_hash.sql
ALTER TABLE videos ADD COLUMN IF NOT EXISTS content_hash TEXT;
CREATE INDEX IF NOT EXISTS idx_videos_content_hash ON videos(content_hash) WHERE content_hash IS NOT NULL;