暂存提交
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
SET NAMES utf8mb4;
|
||||
USE baiyue_firstleg;
|
||||
|
||||
-- 既有履约任务表补充分页查询索引;重复执行时不重复创建。
|
||||
SET @firstleg_task_list_index_sql = IF(
|
||||
EXISTS(SELECT 1 FROM information_schema.statistics
|
||||
WHERE table_schema = DATABASE() AND table_name = 'fl_fulfillment_task'
|
||||
AND index_name = 'idx_task_tenant_created'),
|
||||
'SELECT 1',
|
||||
'CREATE INDEX idx_task_tenant_created ON fl_fulfillment_task (tenant_id, created_at)'
|
||||
);
|
||||
PREPARE firstleg_task_list_index_stmt FROM @firstleg_task_list_index_sql;
|
||||
EXECUTE firstleg_task_list_index_stmt;
|
||||
DEALLOCATE PREPARE firstleg_task_list_index_stmt;
|
||||
Reference in New Issue
Block a user