Files
lgp-admin-plus-api/database/sql/2026-08-18/04_nl_wx_app_package_enabled.sql
2026-08-19 08:16:49 +08:00

15 lines
721 B
SQL
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
-- ============================================================
-- 小程序应用:按品牌开关套餐(两品牌共库,不能写 nl_system_config
-- ============================================================
SET @db := DATABASE();
SET @exists := (
SELECT COUNT(*) FROM information_schema.COLUMNS
WHERE TABLE_SCHEMA = @db AND TABLE_NAME = 'nl_wx_app' AND COLUMN_NAME = 'package_enabled'
);
SET @sql := IF(@exists = 0,
'ALTER TABLE `nl_wx_app` ADD COLUMN `package_enabled` tinyint NOT NULL DEFAULT 0 COMMENT ''1=启用套餐(首页热门+底栏)'' AFTER `template_code`',
'SELECT ''skip nl_wx_app.package_enabled'' AS msg'
);
PREPARE stmt FROM @sql; EXECUTE stmt; DEALLOCATE PREPARE stmt;