-- 按依赖顺序删除所有表（使用 CASCADE 处理循环/复杂外键）

DROP TABLE IF EXISTS daily_reset_tracking CASCADE;
DROP TABLE IF EXISTS nacos_configs CASCADE;
DROP TABLE IF EXISTS reputation_records CASCADE;
DROP TABLE IF EXISTS sworn_brothers CASCADE;
DROP TABLE IF EXISTS lovers CASCADE;
DROP TABLE IF EXISTS social_relations CASCADE;
DROP TABLE IF EXISTS tribulation_records CASCADE;
DROP TABLE IF EXISTS world_ruin_records CASCADE;
DROP TABLE IF EXISTS instance_loot CASCADE;
DROP TABLE IF EXISTS instance_runs CASCADE;
DROP TABLE IF EXISTS instances CASCADE;
DROP TABLE IF EXISTS player_kills CASCADE;
DROP TABLE IF EXISTS battle_logs CASCADE;
DROP TABLE IF EXISTS battles CASCADE;
DROP TABLE IF EXISTS zone_explorations CASCADE;
DROP TABLE IF EXISTS zones CASCADE;
DROP TABLE IF EXISTS regions CASCADE;
DROP TABLE IF EXISTS maps CASCADE;
DROP TABLE IF EXISTS world_layers CASCADE;
DROP TABLE IF EXISTS manhunt_records CASCADE;
DROP TABLE IF EXISTS contract_participants CASCADE;
DROP TABLE IF EXISTS bounties CASCADE;
DROP TABLE IF EXISTS contracts CASCADE;
DROP TABLE IF EXISTS disciple_missions CASCADE;
DROP TABLE IF EXISTS disciples CASCADE;
DROP TABLE IF EXISTS intelligence_orders CASCADE;
DROP TABLE IF EXISTS auction_blacklist_records CASCADE;
DROP TABLE IF EXISTS auction_bids CASCADE;
DROP TABLE IF EXISTS auctions CASCADE;
DROP TABLE IF EXISTS market_orders CASCADE;
DROP TABLE IF EXISTS guild_warehouses CASCADE;
DROP TABLE IF EXISTS guild_diplomacy CASCADE;
DROP TABLE IF EXISTS guild_territories CASCADE;
DROP TABLE IF EXISTS guild_members CASCADE;
DROP TABLE IF EXISTS guilds CASCADE;
DROP TABLE IF EXISTS economy_audit_logs CASCADE;
DROP TABLE IF EXISTS currency_balances CASCADE;
DROP TABLE IF EXISTS currencies CASCADE;
DROP TABLE IF EXISTS equipments CASCADE;
DROP TABLE IF EXISTS inventories CASCADE;
DROP TABLE IF EXISTS items CASCADE;
DROP TABLE IF EXISTS character_skills CASCADE;
DROP TABLE IF EXISTS skills CASCADE;
DROP TABLE IF EXISTS character_manuals CASCADE;
DROP TABLE IF EXISTS manuals CASCADE;
DROP TABLE IF EXISTS realm_breakthrough_records CASCADE;
DROP TABLE IF EXISTS character_realms CASCADE;
DROP TABLE IF EXISTS realms CASCADE;
DROP TABLE IF EXISTS race_currency_wallets CASCADE;
DROP TABLE IF EXISTS character_race_states CASCADE;
DROP TABLE IF EXISTS characters CASCADE;
DROP TABLE IF EXISTS players CASCADE;
DROP TABLE IF EXISTS race_templates CASCADE;

DROP EXTENSION IF EXISTS pgcrypto;
