hyapp-server/scripts/mysql/045_remove_default_self_games.sql
2026-06-11 22:24:16 +08:00

32 lines
804 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.

SET NAMES utf8mb4 COLLATE utf8mb4_unicode_ci;
USE hyapp_game;
-- 清理旧初始化脚本写入的自研游戏展示入口不删除对局、钱包、outbox 和奖池流水,避免破坏历史业务事实。
DELETE FROM game_display_rules
WHERE app_code = 'lalu'
AND game_id IN ('dice', 'rock');
DELETE FROM game_self_game_configs
WHERE app_code = 'lalu'
AND game_id IN ('dice', 'rock');
DELETE FROM game_self_game_pools
WHERE app_code = 'lalu'
AND game_id IN ('dice', 'rock');
DELETE FROM game_catalog
WHERE app_code = 'lalu'
AND game_id IN ('dice', 'rock');
DELETE p
FROM game_platforms p
WHERE p.app_code = 'lalu'
AND p.platform_code = 'dice'
AND NOT EXISTS (
SELECT 1
FROM game_catalog c
WHERE c.app_code = p.app_code
AND c.platform_code = p.platform_code
);