mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[10263] Not allow listing pool elements in more one pool.
NOTE: sql update remove forbided by commit duplicates from pool_* tables in random way.
So for more porper results DB better manually check and fix before apply it.
This is mostly note for DB projects devs.
This commit is contained in:
parent
84dbc4c698
commit
8a3a03e0a6
7 changed files with 51 additions and 8 deletions
|
|
@ -24,7 +24,7 @@ CREATE TABLE `db_version` (
|
|||
`version` varchar(120) default NULL,
|
||||
`creature_ai_version` varchar(120) default NULL,
|
||||
`cache_id` int(10) default '0',
|
||||
`required_10257_01_mangos_command` bit(1) default NULL
|
||||
`required_10263_03_mangos_pool_pool` bit(1) default NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Used DB version notes';
|
||||
|
||||
--
|
||||
|
|
@ -13608,8 +13608,8 @@ CREATE TABLE `pool_creature` (
|
|||
`pool_entry` mediumint(8) unsigned NOT NULL default '0',
|
||||
`chance` float unsigned NOT NULL default '0',
|
||||
`description` varchar(255) NOT NULL,
|
||||
PRIMARY KEY (`pool_entry`,`guid`),
|
||||
INDEX `idx_guid`(`guid`)
|
||||
PRIMARY KEY (`guid`),
|
||||
INDEX `pool_idx` (pool_entry)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
|
|
@ -13632,8 +13632,8 @@ CREATE TABLE `pool_gameobject` (
|
|||
`pool_entry` mediumint(8) unsigned NOT NULL default '0',
|
||||
`chance` float unsigned NOT NULL default '0',
|
||||
`description` varchar(255) NOT NULL,
|
||||
PRIMARY KEY (`guid`,`pool_entry`),
|
||||
INDEX `idx_guid`(`guid`)
|
||||
PRIMARY KEY (`guid`),
|
||||
INDEX `pool_idx` (pool_entry)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
|
||||
--
|
||||
|
|
@ -13655,7 +13655,8 @@ CREATE TABLE `pool_pool` (
|
|||
`mother_pool` mediumint(8) unsigned NOT NULL default '0',
|
||||
`chance` float NOT NULL default '0',
|
||||
`description` varchar(255) NOT NULL,
|
||||
PRIMARY KEY (`pool_id`,`mother_pool`)
|
||||
PRIMARY KEY (pool_id),
|
||||
INDEX pool_idx (mother_pool)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
|
||||
--
|
||||
|
|
|
|||
12
sql/updates/10263_01_mangos_pool_creature.sql
Normal file
12
sql/updates/10263_01_mangos_pool_creature.sql
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
ALTER TABLE db_version CHANGE COLUMN required_10257_01_mangos_command required_10263_01_mangos_pool_creature bit;
|
||||
|
||||
DROP TABLE IF EXISTS pool_creature_temp;
|
||||
CREATE TABLE pool_creature_temp
|
||||
SELECT guid, pool_entry, chance, description FROM pool_creature GROUP BY guid;
|
||||
|
||||
ALTER TABLE pool_creature_temp
|
||||
ADD PRIMARY KEY (guid),
|
||||
ADD INDEX pool_idx (pool_entry);
|
||||
|
||||
DROP TABLE IF EXISTS pool_creature;
|
||||
RENAME TABLE pool_creature_temp TO pool_creature;
|
||||
12
sql/updates/10263_02_mangos_pool_gameobject.sql
Normal file
12
sql/updates/10263_02_mangos_pool_gameobject.sql
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
ALTER TABLE db_version CHANGE COLUMN required_10263_01_mangos_pool_creature required_10263_02_mangos_pool_gameobject bit;
|
||||
|
||||
DROP TABLE IF EXISTS pool_gameobject_temp;
|
||||
CREATE TABLE pool_gameobject_temp
|
||||
SELECT guid, pool_entry, chance, description FROM pool_gameobject GROUP BY guid;
|
||||
|
||||
ALTER TABLE pool_gameobject_temp
|
||||
ADD PRIMARY KEY (guid),
|
||||
ADD INDEX pool_idx (pool_entry);
|
||||
|
||||
DROP TABLE IF EXISTS pool_gameobject;
|
||||
RENAME TABLE pool_gameobject_temp TO pool_gameobject;
|
||||
12
sql/updates/10263_03_mangos_pool_pool.sql
Normal file
12
sql/updates/10263_03_mangos_pool_pool.sql
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
ALTER TABLE db_version CHANGE COLUMN required_10263_02_mangos_pool_gameobject required_10263_03_mangos_pool_pool bit;
|
||||
|
||||
DROP TABLE IF EXISTS pool_pool_temp;
|
||||
CREATE TABLE pool_pool_temp
|
||||
SELECT pool_id, mother_pool, chance, description FROM pool_pool GROUP BY pool_id;
|
||||
|
||||
ALTER TABLE pool_pool_temp
|
||||
ADD PRIMARY KEY (pool_id),
|
||||
ADD INDEX pool_idx (mother_pool);
|
||||
|
||||
DROP TABLE IF EXISTS pool_pool;
|
||||
RENAME TABLE pool_pool_temp TO pool_pool;
|
||||
|
|
@ -53,6 +53,9 @@ pkgdata_DATA = \
|
|||
10254_01_characters_auctionhouse.sql \
|
||||
10256_01_mangos_command.sql \
|
||||
10257_01_mangos_command.sql \
|
||||
10263_01_mangos_pool_creature.sql \
|
||||
10263_02_mangos_pool_gameobject.sql \
|
||||
10263_03_mangos_pool_pool.sql \
|
||||
README
|
||||
|
||||
## Additional files to include when running 'make dist'
|
||||
|
|
@ -86,4 +89,7 @@ EXTRA_DIST = \
|
|||
10254_01_characters_auctionhouse.sql \
|
||||
10256_01_mangos_command.sql \
|
||||
10257_01_mangos_command.sql \
|
||||
10263_01_mangos_pool_creature.sql \
|
||||
10263_02_mangos_pool_gameobject.sql \
|
||||
10263_03_mangos_pool_pool.sql \
|
||||
README
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "10262"
|
||||
#define REVISION_NR "10263"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#ifndef __REVISION_SQL_H__
|
||||
#define __REVISION_SQL_H__
|
||||
#define REVISION_DB_CHARACTERS "required_10254_01_characters_auctionhouse"
|
||||
#define REVISION_DB_MANGOS "required_10257_01_mangos_command"
|
||||
#define REVISION_DB_MANGOS "required_10263_03_mangos_pool_pool"
|
||||
#define REVISION_DB_REALMD "required_10008_01_realmd_realmd_db_version"
|
||||
#endif // __REVISION_SQL_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue