diff options
| author | Brian <runningnak3d@gmail.com> | 2009-12-11 13:35:17 -0700 |
|---|---|---|
| committer | Brian <runningnak3d@gmail.com> | 2009-12-11 13:35:17 -0700 |
| commit | c093a9735eeaac6554c2fa19e26b8cd7f73783b6 (patch) | |
| tree | 0ed61cdec0e0e01790281483097e0933d36bf385 /sql/tools | |
| parent | 4f71c9345df8ecd3d5c2c04d6a938a52405febfc (diff) | |
* This stuff does not belong in the core repo
--HG--
branch : trunk
Diffstat (limited to 'sql/tools')
| -rw-r--r-- | sql/tools/CMakeLists.txt | 6 | ||||
| -rw-r--r-- | sql/tools/Makefile.am | 38 | ||||
| -rw-r--r-- | sql/tools/README | 8 | ||||
| -rw-r--r-- | sql/tools/characters_item_duplicates_remove.sql | 22 | ||||
| -rw-r--r-- | sql/tools/characters_pet_data_cleanup.sql | 3 | ||||
| -rw-r--r-- | sql/tools/world_merge_db/readme.txt | 5 | ||||
| -rw-r--r-- | sql/tools/world_merge_db/world_merge_creature.sql | 51 | ||||
| -rw-r--r-- | sql/tools/world_merge_db/world_remove_merged_creature.sql | 8 | ||||
| -rw-r--r-- | sql/tools/world_remove_all_destructible_buildings.sql | 1 |
9 files changed, 0 insertions, 142 deletions
diff --git a/sql/tools/CMakeLists.txt b/sql/tools/CMakeLists.txt deleted file mode 100644 index d69a6cdbd2b..00000000000 --- a/sql/tools/CMakeLists.txt +++ /dev/null @@ -1,6 +0,0 @@ - -########### install files ############### - -FILE(GLOB _SQL_TOOLS *.sql) - -install(FILES ${_SQL_TOOLS} README DESTINATION share/trinity/sql/tools) diff --git a/sql/tools/Makefile.am b/sql/tools/Makefile.am deleted file mode 100644 index c15007f86ed..00000000000 --- a/sql/tools/Makefile.am +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> -# -# Copyright (C) 2008-2009 Trinity <http://www.trinitycore.org/> -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -## Process this file with automake to produce Makefile.in - -## Sub-directories to parse - -## Change installation location -# datadir = trinity/sql/tools -pkgdatadir = $(datadir)/trinity/sql/tools - -## Files to be installed -# Install basic SQL files to datadir -pkgdata_DATA = \ - characters_item_duplicates_remove.sql \ - characters_pet_data_cleanup.sql \ - README - -## Additional files to include when running 'make dist' -EXTRA_DIST = \ - characters_item_duplicates_remove.sql \ - characters_pet_data_cleanup.sql \ - README diff --git a/sql/tools/README b/sql/tools/README deleted file mode 100644 index 83558cda7f0..00000000000 --- a/sql/tools/README +++ /dev/null @@ -1,8 +0,0 @@ -= Trinity Core -- Database cleanup tools = - -Copyright (C) Trinity Core (http://www.trinitycore.org) - -See the COPYING file for copying conditions. - -These tools can be used to clean a corrupted database. They -should only be used when the sevrer is CLOSED.
\ No newline at end of file diff --git a/sql/tools/characters_item_duplicates_remove.sql b/sql/tools/characters_item_duplicates_remove.sql deleted file mode 100644 index 9cdd8738ecd..00000000000 --- a/sql/tools/characters_item_duplicates_remove.sql +++ /dev/null @@ -1,22 +0,0 @@ -DROP TABLE IF EXISTS item_test; -CREATE TABLE item_test -SELECT w.`item_guid`,w.`source`,w.`count` FROM - (SELECT u.`item_guid`,u.`source`,COUNT(u.`item_guid`) as `count` FROM - ((SELECT c.`item` as `item_guid`, 'i' as `source` FROM character_inventory c) UNION - (SELECT a.`itemguid` as `item_guid`, 'a' as `source` FROM auctionhouse a) UNION - (SELECT m.`item_guid` as `item_guid`, 'm' as `source` FROM mail_items m) UNION - (SELECT g.`item_guid` as `item_guid`, 'g' as `source` FROM guild_bank_item g) - ) as u - GROUP BY u.`item_guid` - ) as w - WHERE w.`count` > 1; - -DELETE FROM auctionhouse WHERE itemguid IN (SELECT item_guid FROM item_test WHERE `source`='i'); -DELETE FROM mail_items WHERE item_guid IN (SELECT item_guid FROM item_test WHERE `source`='i'); -DELETE FROM guild_bank_item WHERE item_guid IN (SELECT item_guid FROM item_test WHERE `source`='i'); - -DELETE FROM mail_items WHERE item_guid IN (SELECT item_guid FROM item_test WHERE `source`='a'); -DELETE FROM guild_bank_item WHERE item_guid IN (SELECT item_guid FROM item_test WHERE `source`='a'); - -DELETE FROM guild_bank_item WHERE item_guid IN (SELECT item_guid FROM item_test WHERE `source`='m'); -DROP TABLE IF EXISTS item_test; diff --git a/sql/tools/characters_pet_data_cleanup.sql b/sql/tools/characters_pet_data_cleanup.sql deleted file mode 100644 index f4454ca856f..00000000000 --- a/sql/tools/characters_pet_data_cleanup.sql +++ /dev/null @@ -1,3 +0,0 @@ -DELETE FROM pet_aura WHERE guid NOT IN (SELECT id FROM character_pet); -DELETE FROM pet_spell WHERE guid NOT IN (SELECT id FROM character_pet); -DELETE FROM pet_spell_cooldown WHERE guid NOT IN (SELECT id FROM character_pet); diff --git a/sql/tools/world_merge_db/readme.txt b/sql/tools/world_merge_db/readme.txt deleted file mode 100644 index 43dd5916326..00000000000 --- a/sql/tools/world_merge_db/readme.txt +++ /dev/null @@ -1,5 +0,0 @@ -Suppose your primary db is called "world", and you have another db called "world2". By running world_merge_xxx.sql you can copy some spawn points which do not exist in "world" from "world2" to "world". - -If you want to apply a update pack to "world", first run world_remove_merged_xxx to remove the merged spawn points of "world2" from "world", then apply update packet, then re-apply world_merge_xxx.sql. Make sure to do that clean up every time you use a update pack on "world" or "world2". Otherwise your db will be messed up. - -Do not use these sql unless you can understand them.
\ No newline at end of file diff --git a/sql/tools/world_merge_db/world_merge_creature.sql b/sql/tools/world_merge_db/world_merge_creature.sql deleted file mode 100644 index 91f9c3f9335..00000000000 --- a/sql/tools/world_merge_db/world_merge_creature.sql +++ /dev/null @@ -1,51 +0,0 @@ --- -------- --- creature_template --- -------- - -DROP TABLE IF EXISTS merge_creature_template; -CREATE TABLE merge_creature_template -SELECT * FROM world2.creature_template WHERE entry NOT IN (SELECT DISTINCT entry FROM creature_template); - -ALTER TABLE merge_creature_template ADD INDEX entry (entry); - -ALTER TABLE merge_creature_template ADD COLUMN spell5 mediumint(8) unsigned NOT NULL default '0' AFTER spell4; -ALTER TABLE merge_creature_template ADD COLUMN spell6 mediumint(8) unsigned NOT NULL default '0' AFTER spell5; -ALTER TABLE merge_creature_template ADD COLUMN spell7 mediumint(8) unsigned NOT NULL default '0' AFTER spell6; -ALTER TABLE merge_creature_template ADD COLUMN spell8 mediumint(8) unsigned NOT NULL default '0' AFTER spell7; -ALTER TABLE merge_creature_template ADD COLUMN VehicleId mediumint(8) unsigned NOT NULL DEFAULT '0' AFTER PetSpellDataId; - -INSERT creature_template SELECT * FROM merge_creature_template; - - --- -------- --- creature_model_info --- -------- - -DROP TABLE IF EXISTS merge_creature_model_info; -CREATE TABLE merge_creature_model_info -SELECT * FROM world2.creature_model_info WHERE modelid NOT IN (SELECT DISTINCT modelid FROM creature_model_info); - -ALTER TABLE merge_creature_model_info ADD INDEX modelid (modelid); - -INSERT creature_model_info SELECT * FROM merge_creature_model_info; - - --- -------- --- creature --- -------- - -DROP TABLE IF EXISTS merge_creature; -CREATE TABLE merge_creature -(guid_new INT NOT NULL AUTO_INCREMENT PRIMARY KEY) -SELECT * FROM world2.creature WHERE id NOT IN (SELECT DISTINCT id FROM creature); - -ALTER TABLE merge_creature ADD INDEX guid (guid); -UPDATE merge_creature SET guid = guid_new + (SELECT MAX(guid) FROM creature); -UPDATE `merge_creature`, `creature_template` SET - -`merge_creature`.`curhealth`=`creature_template`.`minhealth`,`merge_creature`.`curmana`=`creature_template`.`minmana` WHERE `merge_creature`.`id`=`creature_template`.`entry` and - -`creature_template`.`RegenHealth` = '1'; -ALTER TABLE merge_creature DROP COLUMN guid_new; - -INSERT creature SELECT * FROM merge_creature; diff --git a/sql/tools/world_merge_db/world_remove_merged_creature.sql b/sql/tools/world_merge_db/world_remove_merged_creature.sql deleted file mode 100644 index ad3fd85edb6..00000000000 --- a/sql/tools/world_merge_db/world_remove_merged_creature.sql +++ /dev/null @@ -1,8 +0,0 @@ -DELETE FROM creature WHERE guid IN (SELECT guid FROM merge_creature); -DROP TABLE IF EXISTS merge_creature; - -DELETE FROM creature_model_info WHERE modelid IN (SELECT modelid FROM merge_creature_model_info); -DROP TABLE IF EXISTS merge_creature_model_info; - -DELETE FROM creature_template WHERE entry IN (SELECT entry FROM merge_creature_template); -DROP TABLE IF EXISTS merge_creature_template; diff --git a/sql/tools/world_remove_all_destructible_buildings.sql b/sql/tools/world_remove_all_destructible_buildings.sql deleted file mode 100644 index f877502ac3a..00000000000 --- a/sql/tools/world_remove_all_destructible_buildings.sql +++ /dev/null @@ -1 +0,0 @@ -delete from gameobject where id IN (select entry from gameobject_template where type=33); |
