增加规则配置

This commit is contained in:
wuweihua
2026-10-16 13:40:03 +08:00
parent b3f79ffc4c
commit b54cb1b018
16 changed files with 1376 additions and 7 deletions
@@ -0,0 +1,24 @@
-- Rename tables: remove bms_ prefix (run once on existing DB)
SET NAMES utf8mb4;
-- bms_biz_rule -> biz_rule
SET @sql := (
SELECT IF(
EXISTS(SELECT 1 FROM information_schema.tables WHERE table_schema = DATABASE() AND table_name = 'bms_biz_rule')
AND NOT EXISTS(SELECT 1 FROM information_schema.tables WHERE table_schema = DATABASE() AND table_name = 'biz_rule'),
'RENAME TABLE bms_biz_rule TO biz_rule',
'SELECT 1'
)
);
PREPARE stmt FROM @sql; EXECUTE stmt; DEALLOCATE PREPARE stmt;
-- bms_biz_attachment -> biz_attachment
SET @sql := (
SELECT IF(
EXISTS(SELECT 1 FROM information_schema.tables WHERE table_schema = DATABASE() AND table_name = 'bms_biz_attachment')
AND NOT EXISTS(SELECT 1 FROM information_schema.tables WHERE table_schema = DATABASE() AND table_name = 'biz_attachment'),
'RENAME TABLE bms_biz_attachment TO biz_attachment',
'SELECT 1'
)
);
PREPARE stmt FROM @sql; EXECUTE stmt; DEALLOCATE PREPARE stmt;