fix: alter kpi_report index and tenant_name

This commit is contained in:
2024-06-25 14:19:31 +08:00
parent e763c50aeb
commit 1127d81c13
3 changed files with 27 additions and 7 deletions

View File

@@ -37,4 +37,11 @@ CREATE TABLE IF NOT EXISTS `kpi_report` (
INDEX `idx_uid_datetime`(`rm_uid`, `date`, `start_time`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 10660 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
ALTER TABLE `kpi_report`
ADD COLUMN IF NOT EXISTS `tenant_name` varchar(128) NULL AFTER `created_at`;
ALTER TABLE `kpi_report`
ADD INDEX IF NOT EXISTS `idx_timestamp`(`created_at`) USING BTREE,
ADD INDEX IF NOT EXISTS `idx_uid_datetime`(`rm_uid`, `date`, `start_time`) USING BTREE;
SET FOREIGN_KEY_CHECKS = 1;