Files
Browser/RuoYi-Vue-Plus-v4.8.3/script/sql/update/V004_browser_profile_launch_diagnostics.sql
2026-06-25 14:58:52 +08:00

29 lines
715 B
SQL

SET @table_exists := (
SELECT COUNT(1)
FROM information_schema.TABLES
WHERE TABLE_SCHEMA = DATABASE()
AND TABLE_NAME = 'fp_profile'
);
SET @column_exists := (
SELECT COUNT(1)
FROM information_schema.COLUMNS
WHERE TABLE_SCHEMA = DATABASE()
AND TABLE_NAME = 'fp_profile'
AND COLUMN_NAME = 'launch_diagnostics'
);
SET @ddl := IF(
@table_exists = 1 AND @column_exists = 0,
'alter table fp_profile add column launch_diagnostics char(1) default ''0'' comment ''启动时进入诊断页'' after proxy_id',
'select 1'
);
PREPARE stmt FROM @ddl;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
UPDATE fp_profile
SET launch_diagnostics = '0'
WHERE launch_diagnostics IS NULL;