feat: configure hot leagues in match center

This commit is contained in:
hajimi
2026-08-02 02:50:40 +08:00
parent 3e95fad23f
commit 163df0cf85
11 changed files with 109 additions and 67 deletions
+17
View File
@@ -0,0 +1,17 @@
-- 联赛管理增加“热门联赛”配置字段,可重复执行。
SET @schema_name = DATABASE();
SET @has_is_hot = (
SELECT COUNT(*)
FROM information_schema.COLUMNS
WHERE TABLE_SCHEMA = @schema_name
AND TABLE_NAME = 'la_league'
AND COLUMN_NAME = 'is_hot'
);
SET @alter_sql = IF(
@has_is_hot = 0,
'ALTER TABLE `la_league` ADD COLUMN `is_hot` tinyint unsigned NOT NULL DEFAULT 0 COMMENT ''是否热门联赛: 0=否 1=是'' AFTER `is_show`',
'SELECT ''la_league.is_hot already exists'''
);
PREPARE alter_stmt FROM @alter_sql;
EXECUTE alter_stmt;
DEALLOCATE PREPARE alter_stmt;