yumi-golang/migrations/018_lingxian_test_room_id.sql
2026-04-28 18:05:13 +08:00

18 lines
425 B
SQL

SET @column_exists := (
SELECT COUNT(*)
FROM information_schema.COLUMNS
WHERE TABLE_SCHEMA = DATABASE()
AND TABLE_NAME = 'lingxian_provider_config'
AND COLUMN_NAME = 'test_room_id'
);
SET @ddl := IF(
@column_exists = 0,
'ALTER TABLE lingxian_provider_config ADD COLUMN test_room_id VARCHAR(64) DEFAULT NULL AFTER test_token',
'SELECT 1'
);
PREPARE stmt FROM @ddl;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;