mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
* Change sql update naming scheme from absent now revison numbers to date+counter, update old sql update names to preserve proper order.
This commit is contained in:
parent
708440742b
commit
32ad72350f
69 changed files with 128 additions and 125 deletions
|
|
@ -1,6 +1,6 @@
|
|||
UPDATE characters SET data = REPLACE(data,' ',' ');
|
||||
UPDATE characters SET data = CONCAT(TRIM(data),' ');
|
||||
|
||||
UPDATE characters
|
||||
SET data=CONCAT(SUBSTRING_INDEX(SUBSTRING_INDEX(data,' ',1396),' ',-1396),' ','0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0',' ',SUBSTRING_INDEX(SUBSTRING_INDEX(data,' ',1529),' ',-133))
|
||||
WHERE SUBSTRING_INDEX(data,' ',1528) = data AND SUBSTRING_INDEX(data,' ',1527) <> data;
|
||||
UPDATE characters SET data = REPLACE(data,' ',' ');
|
||||
UPDATE characters SET data = CONCAT(TRIM(data),' ');
|
||||
|
||||
UPDATE characters
|
||||
SET data=CONCAT(SUBSTRING_INDEX(SUBSTRING_INDEX(data,' ',1396),' ',-1396),' ','0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0',' ',SUBSTRING_INDEX(SUBSTRING_INDEX(data,' ',1529),' ',-133))
|
||||
WHERE SUBSTRING_INDEX(data,' ',1528) = data AND SUBSTRING_INDEX(data,' ',1527) <> data;
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
UPDATE corpse SET data = REPLACE(data,' ',' ');
|
||||
UPDATE corpse SET data = CONCAT(TRIM(data),' ');
|
||||
|
||||
UPDATE corpse
|
||||
SET data=CONCAT(SUBSTRING_INDEX(SUBSTRING_INDEX(`data`,' ',8),' ',-8),' ','0 0',' ',SUBSTRING_INDEX(SUBSTRING_INDEX(data,' ',39),' ',-31))
|
||||
WHERE SUBSTRING_INDEX(data,' ',38) = data AND SUBSTRING_INDEX(data,' ',37) <> data;
|
||||
UPDATE corpse SET data = REPLACE(data,' ',' ');
|
||||
UPDATE corpse SET data = CONCAT(TRIM(data),' ');
|
||||
|
||||
UPDATE corpse
|
||||
SET data=CONCAT(SUBSTRING_INDEX(SUBSTRING_INDEX(`data`,' ',8),' ',-8),' ','0 0',' ',SUBSTRING_INDEX(SUBSTRING_INDEX(data,' ',39),' ',-31))
|
||||
WHERE SUBSTRING_INDEX(data,' ',38) = data AND SUBSTRING_INDEX(data,' ',37) <> data;
|
||||
|
|
@ -1,34 +1,34 @@
|
|||
TRUNCATE `character_instance`;
|
||||
TRUNCATE `instance`;
|
||||
|
||||
ALTER TABLE `character_instance`
|
||||
DROP KEY `leader`,
|
||||
DROP PRIMARY KEY,
|
||||
ADD PRIMARY KEY `guid` (`guid`,`instance`),
|
||||
DROP COLUMN `map`,
|
||||
DROP COLUMN `leader`,
|
||||
MODIFY COLUMN `instance` int(11) unsigned NOT NULL default '0',
|
||||
ADD COLUMN `permanent` tinyint(1) unsigned NOT NULL default '0';
|
||||
|
||||
ALTER TABLE `instance`
|
||||
ADD COLUMN `difficulty` tinyint(1) unsigned NOT NULL default '0' AFTER `resettime`;
|
||||
|
||||
CREATE TABLE `group_instance` (
|
||||
`leaderGuid` int(11) unsigned NOT NULL default '0',
|
||||
`instance` int(11) unsigned NOT NULL default '0',
|
||||
`permanent` tinyint(1) unsigned NOT NULL default '0',
|
||||
PRIMARY KEY (`leaderGuid`,`instance`),
|
||||
KEY `instance` (`instance`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `instance_reset` (
|
||||
`mapid` int(11) unsigned NOT NULL default '0',
|
||||
`resettime` bigint(40) NOT NULL default '0',
|
||||
PRIMARY KEY (`mapid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
ALTER TABLE `groups`
|
||||
ADD COLUMN `difficulty` tinyint(3) unsigned NOT NULL default '0' AFTER `isRaid`;
|
||||
|
||||
ALTER TABLE `characters`
|
||||
TRUNCATE `character_instance`;
|
||||
TRUNCATE `instance`;
|
||||
|
||||
ALTER TABLE `character_instance`
|
||||
DROP KEY `leader`,
|
||||
DROP PRIMARY KEY,
|
||||
ADD PRIMARY KEY `guid` (`guid`,`instance`),
|
||||
DROP COLUMN `map`,
|
||||
DROP COLUMN `leader`,
|
||||
MODIFY COLUMN `instance` int(11) unsigned NOT NULL default '0',
|
||||
ADD COLUMN `permanent` tinyint(1) unsigned NOT NULL default '0';
|
||||
|
||||
ALTER TABLE `instance`
|
||||
ADD COLUMN `difficulty` tinyint(1) unsigned NOT NULL default '0' AFTER `resettime`;
|
||||
|
||||
CREATE TABLE `group_instance` (
|
||||
`leaderGuid` int(11) unsigned NOT NULL default '0',
|
||||
`instance` int(11) unsigned NOT NULL default '0',
|
||||
`permanent` tinyint(1) unsigned NOT NULL default '0',
|
||||
PRIMARY KEY (`leaderGuid`,`instance`),
|
||||
KEY `instance` (`instance`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `instance_reset` (
|
||||
`mapid` int(11) unsigned NOT NULL default '0',
|
||||
`resettime` bigint(40) NOT NULL default '0',
|
||||
PRIMARY KEY (`mapid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
ALTER TABLE `groups`
|
||||
ADD COLUMN `difficulty` tinyint(3) unsigned NOT NULL default '0' AFTER `isRaid`;
|
||||
|
||||
ALTER TABLE `characters`
|
||||
ADD COLUMN `dungeon_difficulty` tinyint(1) unsigned NOT NULL DEFAULT '0' AFTER `map`;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
DELETE FROM spell_affect WHERE entry = 8875 AND effectId = 1 LIMIT 1;
|
||||
|
||||
INSERT INTO spell_affect ( entry , effectId , SpellFamilyMask ) VALUES
|
||||
(8875, 1, 0x40000000000);
|
||||
DELETE FROM spell_affect WHERE entry = 8875 AND effectId = 1 LIMIT 1;
|
||||
|
||||
INSERT INTO spell_affect ( entry , effectId , SpellFamilyMask ) VALUES
|
||||
(8875, 1, 0x40000000000);
|
||||
|
|
@ -1,56 +1,56 @@
|
|||
--
|
||||
-- Table structure for table `spell_pet_auras`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `spell_pet_auras`;
|
||||
CREATE TABLE `spell_pet_auras` (
|
||||
`spell` mediumint(8) unsigned NOT NULL COMMENT 'dummy spell id',
|
||||
`pet` mediumint(8) unsigned NOT NULL default '0' COMMENT 'pet id; 0 = all',
|
||||
`aura` mediumint(8) unsigned NOT NULL COMMENT 'pet aura id',
|
||||
PRIMARY KEY (`spell`,`pet`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
--
|
||||
-- Dumping data for table `spell_pet_auras`
|
||||
--
|
||||
|
||||
LOCK TABLES `spell_pet_auras` WRITE;
|
||||
/*!40000 ALTER TABLE `spell_pet_auras` DISABLE KEYS */;
|
||||
INSERT INTO `spell_pet_auras` VALUES
|
||||
(19028, 0, 25228),
|
||||
(19578, 0, 19579),
|
||||
(20895, 0, 24529),
|
||||
(28757, 0, 28758),
|
||||
(35029, 0, 35060),
|
||||
(35030, 0, 35061),
|
||||
(35691, 0, 35696),
|
||||
(35692, 0, 35696),
|
||||
(35693, 0, 35696),
|
||||
(23785, 416, 23759),
|
||||
(23822, 416, 23826),
|
||||
(23823, 416, 23827),
|
||||
(23824, 416, 23828),
|
||||
(23825, 416, 23829),
|
||||
(23785, 417, 23762),
|
||||
(23822, 417, 23837),
|
||||
(23823, 417, 23838),
|
||||
(23824, 417, 23839),
|
||||
(23825, 417, 23840),
|
||||
(23785, 1860, 23760),
|
||||
(23822, 1860, 23841),
|
||||
(23823, 1860, 23842),
|
||||
(23824, 1860, 23843),
|
||||
(23825, 1860, 23844),
|
||||
(23785, 1863, 23761),
|
||||
(23822, 1863, 23833),
|
||||
(23823, 1863, 23834),
|
||||
(23824, 1863, 23835),
|
||||
(23825, 1863, 23836),
|
||||
(23785, 17252, 35702),
|
||||
(23822, 17252, 35703),
|
||||
(23823, 17252, 35704),
|
||||
(23824, 17252, 35705),
|
||||
(23825, 17252, 35706);
|
||||
|
||||
/*!40000 ALTER TABLE `spell_pet_auras` ENABLE KEYS */;
|
||||
--
|
||||
-- Table structure for table `spell_pet_auras`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `spell_pet_auras`;
|
||||
CREATE TABLE `spell_pet_auras` (
|
||||
`spell` mediumint(8) unsigned NOT NULL COMMENT 'dummy spell id',
|
||||
`pet` mediumint(8) unsigned NOT NULL default '0' COMMENT 'pet id; 0 = all',
|
||||
`aura` mediumint(8) unsigned NOT NULL COMMENT 'pet aura id',
|
||||
PRIMARY KEY (`spell`,`pet`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
--
|
||||
-- Dumping data for table `spell_pet_auras`
|
||||
--
|
||||
|
||||
LOCK TABLES `spell_pet_auras` WRITE;
|
||||
/*!40000 ALTER TABLE `spell_pet_auras` DISABLE KEYS */;
|
||||
INSERT INTO `spell_pet_auras` VALUES
|
||||
(19028, 0, 25228),
|
||||
(19578, 0, 19579),
|
||||
(20895, 0, 24529),
|
||||
(28757, 0, 28758),
|
||||
(35029, 0, 35060),
|
||||
(35030, 0, 35061),
|
||||
(35691, 0, 35696),
|
||||
(35692, 0, 35696),
|
||||
(35693, 0, 35696),
|
||||
(23785, 416, 23759),
|
||||
(23822, 416, 23826),
|
||||
(23823, 416, 23827),
|
||||
(23824, 416, 23828),
|
||||
(23825, 416, 23829),
|
||||
(23785, 417, 23762),
|
||||
(23822, 417, 23837),
|
||||
(23823, 417, 23838),
|
||||
(23824, 417, 23839),
|
||||
(23825, 417, 23840),
|
||||
(23785, 1860, 23760),
|
||||
(23822, 1860, 23841),
|
||||
(23823, 1860, 23842),
|
||||
(23824, 1860, 23843),
|
||||
(23825, 1860, 23844),
|
||||
(23785, 1863, 23761),
|
||||
(23822, 1863, 23833),
|
||||
(23823, 1863, 23834),
|
||||
(23824, 1863, 23835),
|
||||
(23825, 1863, 23836),
|
||||
(23785, 17252, 35702),
|
||||
(23822, 17252, 35703),
|
||||
(23823, 17252, 35704),
|
||||
(23824, 17252, 35705),
|
||||
(23825, 17252, 35706);
|
||||
|
||||
/*!40000 ALTER TABLE `spell_pet_auras` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
|
@ -1 +1 @@
|
|||
DELETE FROM mangos_string WHERE entry IN (800);
|
||||
DELETE FROM mangos_string WHERE entry IN (800);
|
||||
|
|
@ -1,3 +1,3 @@
|
|||
DELETE FROM command WHERE name = 'reload all_locales';
|
||||
INSERT INTO `command` VALUES
|
||||
('reload all_locales',3,'Syntax: .reload all_locales\r\n\r\nReload all `locales_*` tables with reload support added and that can be _safe_ reloaded.');
|
||||
DELETE FROM command WHERE name = 'reload all_locales';
|
||||
INSERT INTO `command` VALUES
|
||||
('reload all_locales',3,'Syntax: .reload all_locales\r\n\r\nReload all `locales_*` tables with reload support added and that can be _safe_ reloaded.');
|
||||
|
|
@ -12,22 +12,25 @@ To see if you need an update, the file names have been given a fixed structure
|
|||
that should enable you to see if you need an update or not.
|
||||
|
||||
=== File name descriptin ===
|
||||
File names are divided into two parts. First part is the revision that will be
|
||||
compatible with database after apply update. The second part of the name,
|
||||
is the table that needs and update or has been added. See an example below:
|
||||
File names are divided into two parts. First part is the date+counter
|
||||
that show commit apply date that will be compatible with database after apply update.
|
||||
The second part of the name, is the table that needs and update or has been added.
|
||||
See an example below:
|
||||
|
||||
1123_characters_character_spell.sql
|
||||
| | |
|
||||
| | |
|
||||
| | The table character_spell
|
||||
| | will need an update.
|
||||
| |
|
||||
| Name of affected DB (default recommended name)
|
||||
| Can be: characters, mangos, realmd
|
||||
2008_10_17_01_characters_character_spell.sql
|
||||
| | | |
|
||||
| | | |
|
||||
| | | The table character_spell
|
||||
| | | will need an update.
|
||||
| | |
|
||||
| | Name of affected DB (default recommended name)
|
||||
| | Can be: characters, mangos, realmd
|
||||
| |
|
||||
| Counter show number of sql update in updates list for provided data
|
||||
| and set proper order for sql updates for some date
|
||||
|
|
||||
MaNGOS revision older 1123 will need this update.
|
||||
After appling this update DB compatiable with revision 1122
|
||||
will be compatibale with revision 1123.
|
||||
Revision 1123 and any revision after 1123, e.g. 1124 or 1137,
|
||||
already includes this update in the default database
|
||||
file mangos.sql.
|
||||
MaNGOS commit date related to sql update. For related commit
|
||||
you can see http://github.com/mangos/mangos/commits/master
|
||||
Expected commit will be in commits list for provided date and it will have
|
||||
sql update file name (2008_10_17_01_characters_character_spell.sql in our case) in list
|
||||
changed files, After appling this update DB compatiable with found commit.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue