Appearance
Database: File Service (metadata)
Version: 2.0
Date: 2026-11-22
Status: Working baseline (hub slim — column-level SoT = docs-file lab)
Owner repo: platform-file/
DB id: db-file-service
Tên: File Service DB
Tên vật lý: minap_file (DECIDED — D-022; đổi từ file_service Owner 2026-11-22)
Canonical SoT schema: https://docs-file.minap.fxmonit.com/database/
Architecture overview: /architecture/05-storage-and-file-service
Catalog sites: /docs-sites
Hub không còn nhân bản bảng cột đầy đủ. Trang này = pointer + catalog ngắn + quyết định platform liên quan DB.
1. Mục đích
Metadata + đăng ký cloud + config TTL/job cho vòng đời temp → promote → migrate → variant.
Bytes không nằm Postgres.
2. Engine / topology
| Hạng mục | Giá trị | Status |
|---|---|---|
| Engine | PostgreSQL | DECIDED (D-022) |
| Schema | minap_file | DECIDED |
| Timestamps | UTC TIMESTAMPTZ | DECIDED direction |
| Disk roots | ENV Infisical (FS_TEMP_ROOT, FS_LOCAL_ROOT, FS_VARIANT_ROOT) | D-016 |
| Secrets cloud | storage_connections.secret_ciphertext + KEK Infisical | D-016 |
3. Catalog bảng (tóm tắt)
| Bảng | Publish ID | Mục đích |
|---|---|---|
storage_connections | nội bộ | Đích S3-compatible |
temp_uploads | tmp_… | Upload tạm |
files | file_… | File durable + sync/purge + cover_storage_name |
variant_cache | UK (file_id, size_px) | GC variant |
config | PK key | TTL/cron/allowlist/video.cover.* |
migration_jobs | nội bộ | Batch migrate |
Không có: quota/usage, upload_sessions, sync_attempts, FS audit_events (DEFERRED), organization_id.
Cột đầy đủ: docs-file schema.
ERD / config keys: 04-erd, 03-config-keys.
4. ID (D-017)
- Publish:
file_…,tmp_… - Nội bộ:
storage_connections,migration_jobs— không prefix bắt buộc
5. Foresight quota
workspace_id nullable trên temp_uploads / files (Owner 2026-11-21). Pool algorithm = OPEN trên hub 11 — không đóng trong FS schema.
6. OPEN / implement
Catalog OPEN File Service: docs-file OPEN.
Không mở rộng danh sách §15 cũ trên hub — tránh dual SoT.
7. Liên kết
| Tài liệu | URL / path |
|---|---|
| Schema SoT | docs-file database |
| Lifecycle | docs-file lifecycle |
| Platform storage overview | 05 |
| Object store sau MinIO | 92 |
| Chat đính kèm | 06 §4 |