fix: revert file_uuid to simple format (32 chars)

**Problem**:
- Changed to hyphenated format (36 chars)
- videos.file_uuid is varchar(32)
- Caused regression: 'value too long for type'

**Fix**:
- Reverted to simple().to_string() (32 chars)
- Schema convention: ~10 tables use varchar(32)
- Hyphenated format is for command_id, not file_uuid

**Kept**:
- FFPROBE_PATH environment variable (verified working)

**Reference**: M4 analysis of schema constraints
This commit is contained in:
Accusys
2026-10-05 04:17:54 +08:00
parent 76c52f12fc
commit e398595734
+2 -2
View File
@@ -165,8 +165,8 @@ async fn handle_register(path: &str) -> Result<()> {
anyhow::bail!("File not found: {}", path);
}
// 產生 file_uuid (Uuid::new_v4(),標準格式帶連字號)
let file_uuid = Uuid::new_v4().to_string();
// 產生 file_uuid (Uuid::new_v4(),simple format,32 chars,符合 schema varchar(32))
let file_uuid = Uuid::new_v4().simple().to_string();
println!("Generated UUID: {}", file_uuid);
// ffprobe 提取 metadata