690524:2148 ADR-028-228-migration #05
This commit is contained in:
@@ -65,9 +65,11 @@ CREATE TABLE IF NOT EXISTS migration_errors (
|
||||
'UNKNOWN'
|
||||
),
|
||||
error_message TEXT,
|
||||
job_id VARCHAR(100) NULL,
|
||||
raw_ai_response TEXT,
|
||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
INDEX idx_batch_id (batch_id),
|
||||
INDEX idx_job_id (job_id),
|
||||
INDEX idx_error_type (error_type)
|
||||
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = 'Migration: Error Log';
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
-- File: specs/03-Data-and-Storage/deltas/2026-05-24-add-migration-errors-job-id.rollback.sql
|
||||
-- Change Log:
|
||||
-- - 2026-05-24: Rollback สำหรับลบ job_id ออกจาก migration_errors
|
||||
|
||||
-- Delta Rollback: ลบคอลัมน์ job_id สำหรับ Migration Error Log
|
||||
-- Related ADR: ADR-009, ADR-023A, ADR-028
|
||||
|
||||
ALTER TABLE migration_errors
|
||||
DROP INDEX idx_migration_errors_job_id,
|
||||
DROP COLUMN job_id;
|
||||
@@ -0,0 +1,11 @@
|
||||
-- File: specs/03-Data-and-Storage/deltas/2026-05-24-add-migration-errors-job-id.sql
|
||||
-- Change Log:
|
||||
-- - 2026-05-24: เพิ่ม job_id ใน migration_errors เพื่อผูก error log กับ BullMQ AI job
|
||||
|
||||
-- Delta: เพิ่มคอลัมน์ job_id สำหรับ Migration Error Log
|
||||
-- Related ADR: ADR-009, ADR-023A, ADR-028
|
||||
|
||||
ALTER TABLE migration_errors
|
||||
ADD COLUMN job_id VARCHAR(100) NULL COMMENT 'BullMQ Job ID สำหรับ trace error ของ AI migration'
|
||||
AFTER error_message,
|
||||
ADD INDEX idx_migration_errors_job_id (job_id);
|
||||
Reference in New Issue
Block a user