WARNING: This is just an FYI to Angelox - I do not recommend anyone using this script until you test it out first on a backed-up database.
------------
Angelox, whenever I grab one of your databases, I usually use the PEQ "dump_users.sql" to get rid of those tables in your database, then migrate the remaining "system" tables to the new database.
This is the full script I have used. First, I switch to the current AX_PEQ and drop server-specific tables:
Code:
use ax_peq;
DROP TABLE IF EXISTS aa_timers;
DROP TABLE IF EXISTS account;
DROP TABLE IF EXISTS character_;
DROP TABLE IF EXISTS character_backup;
DROP TABLE IF EXISTS commands;
DROP TABLE IF EXISTS eventlog;
DROP TABLE IF EXISTS faction_values;
DROP TABLE IF EXISTS guilds;
DROP TABLE IF EXISTS guild_ranks;
DROP TABLE IF EXISTS guild_relations;
DROP TABLE IF EXISTS guild_members;
DROP TABLE IF EXISTS guild_alliances;
DROP TABLE IF EXISTS guild_controllers;
DROP TABLE IF EXISTS hackers;
DROP TABLE IF EXISTS inventory;
DROP TABLE IF EXISTS launcher;
DROP TABLE IF EXISTS launcher_zones;
DROP TABLE IF EXISTS logs;
DROP TABLE IF EXISTS name_filter;
DROP TABLE IF EXISTS object_contents;
DROP TABLE IF EXISTS peq_admin;
DROP TABLE IF EXISTS petitions;
DROP TABLE IF EXISTS player_corpses;
DROP TABLE IF EXISTS player_corpses_backup;
DROP TABLE IF EXISTS quest_globals;
DROP TABLE IF EXISTS rule_sets;
DROP TABLE IF EXISTS rule_values;
DROP TABLE IF EXISTS variables;
DROP TABLE IF EXISTS spells;
DROP TABLE IF EXISTS sharedbank;
DROP TABLE IF EXISTS timers;
Then, I go to my current PEQ database and drop all system-related tables:
Code:
use peq;
DROP TABLE IF EXISTS aa_actions;
DROP TABLE IF EXISTS aa_levels;
DROP TABLE IF EXISTS aa_swarmpets;
DROP TABLE IF EXISTS altadv_vars;
DROP TABLE IF EXISTS books;
DROP TABLE IF EXISTS class_skill;
DROP TABLE IF EXISTS doors;
DROP TABLE IF EXISTS faction_list;
DROP TABLE IF EXISTS fear_hints;
DROP TABLE IF EXISTS fishing;
DROP TABLE IF EXISTS forage;
DROP TABLE IF EXISTS grid;
DROP TABLE IF EXISTS grid_entries;
DROP TABLE IF EXISTS ground_spawns;
DROP TABLE IF EXISTS items;
DROP TABLE IF EXISTS lootdrop;
DROP TABLE IF EXISTS lootdrop_entries;
DROP TABLE IF EXISTS loottable;
DROP TABLE IF EXISTS loottable_entries;
DROP TABLE IF EXISTS merchantlist;
DROP TABLE IF EXISTS merchantlist_temp;
DROP TABLE IF EXISTS merchantsets;
DROP TABLE IF EXISTS npc_faction;
DROP TABLE IF EXISTS npc_faction_entries;
DROP TABLE IF EXISTS npc_spells;
DROP TABLE IF EXISTS npc_spells_entries;
DROP TABLE IF EXISTS npc_types;
DROP TABLE IF EXISTS object;
DROP TABLE IF EXISTS pets;
DROP TABLE IF EXISTS spawn2;
DROP TABLE IF EXISTS spawn_conditions;
DROP TABLE IF EXISTS spawn_events;
DROP TABLE IF EXISTS spawnentry;
DROP TABLE IF EXISTS spawngroup;
DROP TABLE IF EXISTS start_zones;
DROP TABLE IF EXISTS starting_items;
DROP TABLE IF EXISTS tradeskill_recipe;
DROP TABLE IF EXISTS tradeskill_recipe_entries;
DROP TABLE IF EXISTS traps;
DROP TABLE IF EXISTS tribute_levels;
DROP TABLE IF EXISTS tributes;
DROP TABLE IF EXISTS zone;
DROP TABLE IF EXISTS zone_points;
DROP TABLE IF EXISTS zone_server;
DROP TABLE IF EXISTS zone_state_dump;
DROP TABLE IF EXISTS zoneserver_auth;
DROP TABLE IF EXISTS zone_flags;
I have not done this in a while, but this is what I was doing when databases were being updated routinely. I am currently running raw-PEQ, so I cannot vouch that this is perfect today. Also, this is one script - from use ax_peq to drop zone_flags. The last step is to then backup (or physically move) the remaining database files from AX_PEQ into your PEQ tables, and you're done.