mirror of
https://github.com/mangosfour/server.git
synced 2025-12-25 13:37:02 +00:00
[9339] Use group ids for indexing groups in DB
* Use group ids in DB * Pack used group ids at server startup * Finaly drop group search by leader guid.
This commit is contained in:
parent
b50c3a9355
commit
c9c578b5c3
11 changed files with 129 additions and 68 deletions
15
sql/updates/9339_01_characters_group.sql
Normal file
15
sql/updates/9339_01_characters_group.sql
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
ALTER TABLE character_db_version CHANGE COLUMN required_9250_01_characters_character required_9339_01_characters_group bit;
|
||||
|
||||
ALTER TABLE groups
|
||||
ADD COLUMN `groupId` int(11) unsigned NOT NULL FIRST;
|
||||
|
||||
UPDATE groups
|
||||
SET `groupId` = `leaderGuid`;
|
||||
|
||||
ALTER TABLE groups
|
||||
DROP PRIMARY KEY,
|
||||
ADD PRIMARY KEY (`groupId`),
|
||||
ADD UNIQUE KEY (`leaderGuid`);
|
||||
|
||||
ALTER TABLE group_member
|
||||
CHANGE COLUMN `leaderGuid` `groupId` int(11) unsigned NOT NULL;
|
||||
Loading…
Add table
Add a link
Reference in a new issue