# 清理数据sql

delete from kku_users where id > 10000;
delete from kku_user_times where 1=1;
delete from kku_user_secret_passwords where 1=1;
delete from kku_user_reals where 1=1;
delete from kku_user_punishs where 1=1;
delete from kku_user_phones where 1=1;
delete from kku_user_phone_resets where 1=1;
delete from kku_user_password_resets where 1=1;
delete from kku_user_logs where 1=1;
delete from kku_user_log_clear_records where 1=1;
delete from kku_user_internals where 1=1;
delete from kku_user_infos where 1=1;
delete from kku_user_email_resets where 1=1;
delete from kku_user_daytimes where 1=1;
delete from kku_user_collections where 1=1;
delete from kku_user_actions where 1=1;

# urs 团队
delete from  kku_urs_promotion_user_talents where 1=1;
delete from  kku_urs_promotion_user_referrals where 1=1;
delete from kku_urs_promotion_user_mappings where 1=1;
# delete from  kku_urs_promotion_talent_configs 不处理，配置项目
delete from  kku_urs_promotion_profits where 1=1;

# 划转模块
delete from  kku_transfer_orders where 1=1;
# kku_transfer_apps 不处理，配置项目

# kku_thirdparty_services 不处理, 配置项目，三方服务的配置
delete from  kku_thirdparty_quotas where 1=1;
delete  from  kku_thirdparty_monitors where 1=1;
delete from  kku_thirdparty_logs where 1=1;
# kku_thirdparty_credentials 不处理，配置项目，三方服务凭证

# 任务 模块
delete  from   kku_test where 1=1;
delete  from   kku_task_user_tasks where 1=1;
delete  from   kku_task_user_progress where 1=1;
delete  from   kku_task_tasks where 1=1;
delete  from   kku_task_rewards where 1=1;
delete  from   kku_task_reward_logs where 1=1;
delete  from   kku_task_reset_logs where 1=1;
delete  from   kku_task_costs where 1=1;
delete  from  kku_task_cost_logs where 1=1;
delete  from  kku_task_conditions where 1=1;
delete  from   kku_task_completion_logs where 1=1;
delete  from   kku_task_categories where 1=1;
delete  from   kku_task_achievement_conditions where 1=1;

delete  from  kku_sys_request_logs where 1=1;

# kku_sys_configs
# kku_sms_sms
# kku_sms_gateway
# kku_sms_dbgateway
# kku_sms_config
# kku_sms_code
delete  from kku_shop_user_purchase_counters where 1=1;
delete  from kku_shop_purchase_logs where 1=1;
delete  from kku_shop_purchase_limits where 1=1;
# delete  from kku_shop_promotions
# delete  from kku_shop_promotion_items
# kku_shop_items 不处理，配置项目,商品表
# kku_shop_categories 不处理
# kku_sessions
# 点数，积分模块
# delete  from kku_point_user_points where user_id  > 10000;
delete  from  kku_point_transfer where 1=1;
delete  from  kku_point_order where 1=1;
delete  from  kku_point_logs  where user_id  > 10000;;
# kku_point_currency 不处理，配置项目，币种
# kku_point_config 不处理，配置项目，积分配置
delete  from  kku_point_circulation where 1=1;
delete  from kku_point_admin where  user_id  > 10000;;
delete from  kku_point where user_id  > 10000;

# 宠物模块
delete from  kku_pet_users where 1=1;
# kku_pet_skills 不处理，配置项目，宠物技能配置
delete  from  kku_pet_skill_logs where 1=1;
delete  from  kku_pet_remould_logs where 1=1;
# kku_pet_level_configs 不处理，配置项目，宠物等级配置
# kku_pet_configs 不处理，配置项目，宠物配置
# kku_pet_battle_teams
# kku_pet_battle_team_members
# kku_pet_battle_seasons
# kku_pet_battle_logs
delete from  kku_pet_active_skills where 1=1;

# kku_password_reset_tokens

# kku_openapi_webhooks
# kku_openapi_stats
# kku_openapi_scopes
# kku_openapi_rate_limits
# kku_openapi_logs
# kku_openapi_keys
# kku_openapi_apps
# kku_oauth_refresh_tokens
# kku_oauth_clients
# kku_oauth_auth_codes
# kku_oauth_access_tokens
# kku_migrations

# 匹配交易
delete from   kku_mex_warehouse where 1=1;
delete from   kku_mex_transactions where 1=1;
# kku_mex_price_configs 不处理，配置项目，商品价格配置
delete from   kku_mex_orders where 1=1;
delete from   kku_mex_admin_operations where 1=1;

# kku_jobs
delete from kku_job_runs where 1=1;
# kku_job_batches

delete from  kku_item_users where user_id > 10000;
delete from kku_item_user_recipes where user_id > 10000;
delete from kku_item_user_output_counters where user_id > 10000;
delete from kku_item_transaction_logs where 1=1;

# kku_item_recipes  不处理，配置项目，配方配置
delete from kku_item_pity_times  where user_id > 10000;
# kku_item_output_limits  不处理，配置项目，物品产出限制配置
# kku_item_items 不处理，配置项目，物品配置
# kku_item_instances 不处理，配置项目，物品实例配置
# kku_item_groups 不处理，配置项目，物品组配置
# kku_item_group_items 不处理，配置项目，物品组项目配置
delete from kku_item_freeze_logs where user_id > 10000;
# kku_item_dismantle_rules  不处理，配置项目，物品分解配置
# kku_item_dismantle_results 表已废弃，不再使用
delete from kku_item_dismantle_logs where user_id > 10000;
delete from kku_item_craft_logs where user_id > 10000;
delete from kku_item_chest_open_logs where user_id > 10000;
#  kku_item_chest_configs
# kku_item_categories
# kku_hash_test
delete from  kku_game_user_skins where user_id > 10000;
# kku_game_tags
# kku_game_tag_relations
delete from kku_game_reward_logs where user_id > 10000;
# kku_game_reward_items
# kku_game_reward_groups
# kku_game_reward_group_pity_counts
# kku_game_consume_items
# kku_game_consume_groups
# kku_game_condition_items
# kku_game_condition_groups
delete from  kku_fund_transfer where user_id > 10000;
delete from  kku_fund_recharge where user_id > 10000;
# delete from kku_fund_order where user_id > 10000;
delete from  kku_fund_logs where user_id > 10000;
# kku_fund_currency
# kku_fund_config 不处理，
delete from kku_fund_circulation where 1=1;
delete from  kku_fund_admin where 1=1;
delete from kku_fund where user_id > 10000;

# kku_friend_requests
# kku_friend_relations
# kku_file_template
# kku_file_storage_configs
# kku_file_storage_config_histories
# kku_file_imgs
# kku_file_files

# 农场
delete from  kku_farm_users where user_id >10000;
delete from  kku_farm_upgrade_logs where user_id >10000;
delete  from  kku_farm_sow_logs where user_id >10000;
# kku_farm_shrine_configs 神像配置
# kku_farm_seeds 种子配置
# kku_farm_seed_outputs 种子产出配置
#   kku_farm_mystery_seed_land_effects   神奇种子土地效果
delete  from  kku_farm_land_users where user_id >10000;
# kku_farm_land_upgrade_configs
# kku_farm_land_types
# kku_farm_house_configs
delete  from  kku_farm_harvest_logs where user_id > 10000;
delete  from kku_farm_god_buffs  where user_id > 10000;
# kku_farm_fruit_growth_cycles 不处理，果实成长周期
delete  from  kku_farm_crops where user_id > 10000;
# kku_farm_configs


delete  from kku_failed_jobs where 1=1;
delete from kku_continuous_times where user_id > 10000;

# kku_cleanup_tasks
# kku_cleanup_table_stats
# kku_cleanup_sql_backups
# kku_cleanup_plans_backup
# kku_cleanup_plans
# kku_cleanup_plan_contents
# kku_cleanup_logs
# kku_cleanup_configs
# kku_cleanup_backups
# kku_cleanup_backup_files

delete  from  kku_cache_locks where 1=1;
delete  from  kku_cache where 1=1;
# kku_articles
# kku_article_cates
# kku_app_messages
# kku_app_message_templates
# kku_app_message_recipients
# kku_admin_users
# kku_admin_settings
# kku_admin_roles
# kku_admin_role_users
# kku_admin_role_permissions
# kku_admin_role_menu
# kku_admin_permissions
# kku_admin_permission_menu
# kku_admin_menu_backup_2025_06_14_13_50_28
# kku_admin_menu
# kku_admin_grid_views
# kku_admin_extensions
# kku_admin_extension_histories
# kku_admin_actionlogs
# kku_activity_user__data
# kku_activity_participation
# kku_activity_config
# kku_activity_condition
