更新处理这个外观部分

This commit is contained in:
super
2026-05-01 00:09:14 +08:00
parent 668226a99d
commit 70658041a5
9 changed files with 411 additions and 69 deletions

View File

@@ -0,0 +1,16 @@
SET @db_name = DATABASE();
SET @idx_exists := (
SELECT COUNT(*)
FROM information_schema.STATISTICS
WHERE TABLE_SCHEMA = @db_name
AND TABLE_NAME = 'biz_task_file_job'
AND INDEX_NAME = 'idx_file_job_module_type_result'
);
SET @sql := IF(@idx_exists = 0,
'ALTER TABLE biz_task_file_job ADD INDEX idx_file_job_module_type_result (module_type, job_type, result_id)',
'SELECT 1'
);
PREPARE stmt FROM @sql;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;