初始化
缺陷:主题配色需要优化整体的同风格
This commit is contained in:
15
database/sql/2026-08-14/01_cc_carousel_add_status.sql
Normal file
15
database/sql/2026-08-14/01_cc_carousel_add_status.sql
Normal file
@@ -0,0 +1,15 @@
|
||||
-- ============================================================
|
||||
-- cc_carousel 补 status 列(幂等)
|
||||
-- 新后台 CRUD / 启停开关依赖此列;老表从未有 status
|
||||
-- ============================================================
|
||||
|
||||
SET @db := DATABASE();
|
||||
SET @exists := (
|
||||
SELECT COUNT(*) FROM information_schema.COLUMNS
|
||||
WHERE TABLE_SCHEMA = @db AND TABLE_NAME = 'cc_carousel' AND COLUMN_NAME = 'status'
|
||||
);
|
||||
SET @sql := IF(@exists = 0,
|
||||
'ALTER TABLE `cc_carousel` ADD COLUMN `status` tinyint(1) NOT NULL DEFAULT 0 COMMENT ''状态 0显示 1隐藏'' AFTER `sort`',
|
||||
'SELECT ''skip cc_carousel.status'' AS msg'
|
||||
);
|
||||
PREPARE stmt FROM @sql; EXECUTE stmt; DEALLOCATE PREPARE stmt;
|
||||
Reference in New Issue
Block a user