KB-AF6F

S109 CP-3B Report — Directus MySQL → PostgreSQL

2 min read Revision 1

S109 CP-3B Report — Directus MySQL → PostgreSQL

Date: 2026-03-11 | Verified by: Claude (Computer Use trực tiếp)

Kết quả: 6/6 PASS

  1. Fingerprint khớp 100%: 18 collections + 7 system match, +18 changelog = startup flows
  2. Directus healthy trên PG: /server/health → {"status":"ok"}
  3. Data đầy đủ: modules=4, meta_catalog=20, flows=112
  4. MySQL stopped: docker ps không có mysql, postgres healthy
  5. Nuxt + Agent Data OK: Nuxt 200, Agent Data healthy
  6. Flow trigger OK: Create → changelog #566, Delete → #567-569

Migration details

  • 138 tables, 39,710 rows migrated via Python script
  • Fixed MySQL→PG: DEFAULT CURRENT_TIMESTAMP cho NOT NULL timestamp columns
  • MySQL volume giữ nguyên cho rollback 7 ngày
  • Backup: /opt/incomex/backups/mysql-pre-pg-migration.sql

Verify trực tiếp (Computer Use)

  • Agent Data: healthy, postgres 1.4ms latency, 362 docs, ratio 1.38
  • Directus API: modules 4 items đúng code, meta_catalog 20 items đúng
  • Registries UI: 1303 nguyên tử, 20 loại, hiện data chính xác
  • Knowledge Hub: 150 documents, 5 sections
  • Vector search: hoạt động đúng

Kiến trúc SAU CP-3B

  • PostgreSQL 16 = DATABASE DUY NHẤT (Directus + Agent Data metadata)
  • Qdrant = Vector search (không đổi)
  • MySQL = RETIRED (volume giữ backup)