mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-24 06:06:23 +00:00
refactor(DB): Move old archive files to old dir (#18164)
* refactor(DB): Move old archive files to old dir * fix auth and char
This commit is contained in:
3
data/sql/old/db_characters/1.x/2016_07_09_00.sql
Normal file
3
data/sql/old/db_characters/1.x/2016_07_09_00.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
CREATE TABLE `characters_db_version` (
|
||||
`2016_07_09_00` BIT(1) DEFAULT NULL
|
||||
) ENGINE=MYISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Last applied sql update to DB';
|
||||
1
data/sql/old/db_characters/1.x/2016_07_09_01.sql
Normal file
1
data/sql/old/db_characters/1.x/2016_07_09_01.sql
Normal file
@@ -0,0 +1 @@
|
||||
ALTER TABLE characters_db_version CHANGE COLUMN 2016_07_09_00 2016_07_09_01 bit;
|
||||
28
data/sql/old/db_characters/1.x/2016_07_10_00.sql
Normal file
28
data/sql/old/db_characters/1.x/2016_07_10_00.sql
Normal file
@@ -0,0 +1,28 @@
|
||||
ALTER TABLE characters_db_version CHANGE COLUMN 2016_07_09_01 2016_07_10_00 bit;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `pvpstats_battlegrounds` (
|
||||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`winner_faction` tinyint(4) NOT NULL,
|
||||
`bracket_id` tinyint(3) unsigned NOT NULL,
|
||||
`type` tinyint(3) unsigned NOT NULL,
|
||||
`date` datetime NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `pvpstats_players` (
|
||||
`battleground_id` bigint(20) unsigned NOT NULL,
|
||||
`character_guid` int(10) unsigned NOT NULL,
|
||||
`winner` bit(1) NOT NULL,
|
||||
`score_killing_blows` mediumint(8) unsigned NOT NULL,
|
||||
`score_deaths` mediumint(8) unsigned NOT NULL,
|
||||
`score_honorable_kills` mediumint(8) unsigned NOT NULL,
|
||||
`score_bonus_honor` mediumint(8) unsigned NOT NULL,
|
||||
`score_damage_done` mediumint(8) unsigned NOT NULL,
|
||||
`score_healing_done` mediumint(8) unsigned NOT NULL,
|
||||
`attr_1` mediumint(8) unsigned NOT NULL DEFAULT '0',
|
||||
`attr_2` mediumint(8) unsigned NOT NULL DEFAULT '0',
|
||||
`attr_3` mediumint(8) unsigned NOT NULL DEFAULT '0',
|
||||
`attr_4` mediumint(8) unsigned NOT NULL DEFAULT '0',
|
||||
`attr_5` mediumint(8) unsigned NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`battleground_id`,`character_guid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
25
data/sql/old/db_characters/1.x/2016_07_30_00.sql
Normal file
25
data/sql/old/db_characters/1.x/2016_07_30_00.sql
Normal file
@@ -0,0 +1,25 @@
|
||||
ALTER TABLE characters_db_version CHANGE COLUMN 2016_07_10_00 2016_07_30_00 bit;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `gm_ticket` (
|
||||
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`type` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '0 open, 1 closed, 2 character deleted',
|
||||
`playerGuid` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Global Unique Identifier of ticket creator',
|
||||
`name` varchar(12) NOT NULL COMMENT 'Name of ticket creator',
|
||||
`description` text NOT NULL,
|
||||
`createTime` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`mapId` smallint(5) unsigned NOT NULL DEFAULT '0',
|
||||
`posX` float NOT NULL DEFAULT '0',
|
||||
`posY` float NOT NULL DEFAULT '0',
|
||||
`posZ` float NOT NULL DEFAULT '0',
|
||||
`lastModifiedTime` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`closedBy` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`assignedTo` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'GUID of admin to whom ticket is assigned',
|
||||
`comment` text NOT NULL,
|
||||
`response` text NOT NULL,
|
||||
`completed` tinyint(3) unsigned NOT NULL DEFAULT '0',
|
||||
`escalated` tinyint(3) unsigned NOT NULL DEFAULT '0',
|
||||
`viewed` tinyint(3) unsigned NOT NULL DEFAULT '0',
|
||||
`needMoreHelp` tinyint(3) unsigned NOT NULL DEFAULT '0',
|
||||
`resolvedBy` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'GUID of GM who resolved the ticket',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=10572 DEFAULT CHARSET=utf8 COMMENT='Player System';
|
||||
35
data/sql/old/db_characters/1.x/2016_08_08_00.sql
Normal file
35
data/sql/old/db_characters/1.x/2016_08_08_00.sql
Normal file
@@ -0,0 +1,35 @@
|
||||
ALTER TABLE characters_db_version CHANGE COLUMN 2016_07_30_00 2016_08_08_00 bit;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `battleground_deserters` (
|
||||
`guid` INT(10) UNSIGNED NOT NULL COMMENT 'characters.guid',
|
||||
`type` TINYINT(3) UNSIGNED NOT NULL COMMENT 'type of the desertion',
|
||||
`datetime` DATETIME NOT NULL COMMENT 'datetime of the desertion'
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `pvpstats_battlegrounds` (
|
||||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`winner_faction` tinyint(4) NOT NULL,
|
||||
`bracket_id` tinyint(3) unsigned NOT NULL,
|
||||
`type` tinyint(3) unsigned NOT NULL,
|
||||
`date` datetime NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=8298 DEFAULT CHARSET=latin1;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `pvpstats_players` (
|
||||
`battleground_id` bigint(20) unsigned NOT NULL,
|
||||
`character_guid` int(10) unsigned NOT NULL,
|
||||
`winner` bit(1) NOT NULL,
|
||||
`score_killing_blows` mediumint(8) unsigned NOT NULL,
|
||||
`score_deaths` mediumint(8) unsigned NOT NULL,
|
||||
`score_honorable_kills` mediumint(8) unsigned NOT NULL,
|
||||
`score_bonus_honor` mediumint(8) unsigned NOT NULL,
|
||||
`score_damage_done` mediumint(8) unsigned NOT NULL,
|
||||
`score_healing_done` mediumint(8) unsigned NOT NULL,
|
||||
`attr_1` mediumint(8) unsigned NOT NULL DEFAULT '0',
|
||||
`attr_2` mediumint(8) unsigned NOT NULL DEFAULT '0',
|
||||
`attr_3` mediumint(8) unsigned NOT NULL DEFAULT '0',
|
||||
`attr_4` mediumint(8) unsigned NOT NULL DEFAULT '0',
|
||||
`attr_5` mediumint(8) unsigned NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`battleground_id`,`character_guid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
|
||||
47
data/sql/old/db_characters/1.x/2016_08_12_00.sql
Normal file
47
data/sql/old/db_characters/1.x/2016_08_12_00.sql
Normal file
@@ -0,0 +1,47 @@
|
||||
ALTER TABLE characters_db_version CHANGE COLUMN 2016_08_08_00 2016_08_12_00 bit;
|
||||
|
||||
-- `character_aura`
|
||||
ALTER TABLE `character_aura`
|
||||
CHANGE `caster_guid` `casterGuid` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'Full Global Unique Identifier',
|
||||
CHANGE `item_guid` `itemGuid` bigint(20) unsigned NOT NULL DEFAULT '0',
|
||||
CHANGE `effect_mask` `effectMask` tinyint(3) unsigned NOT NULL DEFAULT '0',
|
||||
CHANGE `recalculate_mask` `recalculateMask` tinyint(3) unsigned NOT NULL DEFAULT '0',
|
||||
CHANGE `stackcount` `stackCount` tinyint(3) unsigned NOT NULL DEFAULT '1',
|
||||
CHANGE `maxduration` `maxDuration` int(11) NOT NULL DEFAULT '0',
|
||||
CHANGE `remaintime` `remainTime` int(11) NOT NULL DEFAULT '0',
|
||||
CHANGE `remaincharges` `remainCharges` tinyint(3) unsigned NOT NULL DEFAULT '0';
|
||||
|
||||
-- `character_glyphs`
|
||||
ALTER TABLE `character_glyphs`
|
||||
CHANGE `spec` `talentGroup` tinyint(3) unsigned NOT NULL DEFAULT '0';
|
||||
|
||||
-- `characters`
|
||||
ALTER TABLE `characters`
|
||||
CHANGE `speccount` `talentGroupsCount` tinyint(3) unsigned NOT NULL DEFAULT '1',
|
||||
CHANGE `activespec` `activeTalentGroup` tinyint(3) unsigned NOT NULL DEFAULT '0';
|
||||
|
||||
-- `gm_subsurveys` -> `gm_subsurvey`
|
||||
RENAME TABLE `gm_subsurveys` TO `gm_subsurvey`;
|
||||
ALTER TABLE `gm_subsurvey`
|
||||
CHANGE `subsurveyId` `questionId` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
CHANGE `rank` `answer` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
CHANGE `comment` `answerComment` text NOT NULL;
|
||||
|
||||
-- `gm_surveys` -> `gm_survey`
|
||||
RENAME TABLE `gm_surveys` TO `gm_survey`;
|
||||
ALTER TABLE `gm_survey`
|
||||
CHANGE `overallComment` `comment` longtext NOT NULL;
|
||||
|
||||
-- `groups`
|
||||
ALTER TABLE `groups`
|
||||
CHANGE `raiddifficulty` `raidDifficulty` tinyint(3) unsigned NOT NULL DEFAULT '0';
|
||||
|
||||
-- `pet_aura`
|
||||
ALTER TABLE `pet_aura`
|
||||
CHANGE `caster_guid` `casterGuid` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'Full Global Unique Identifier',
|
||||
CHANGE `effect_mask` `effectMask` tinyint(3) unsigned NOT NULL DEFAULT '0',
|
||||
CHANGE `recalculate_mask` `recalculateMask` tinyint(3) unsigned NOT NULL DEFAULT '0',
|
||||
CHANGE `stackcount` `stackCount` tinyint(3) unsigned NOT NULL DEFAULT '1',
|
||||
CHANGE `maxduration` `maxDuration` int(11) NOT NULL DEFAULT '0',
|
||||
CHANGE `remaintime` `remainTime` int(11) NOT NULL DEFAULT '0',
|
||||
CHANGE `remaincharges` `remainCharges` tinyint(3) unsigned NOT NULL DEFAULT '0';
|
||||
7
data/sql/old/db_characters/1.x/2016_08_14_00.sql
Normal file
7
data/sql/old/db_characters/1.x/2016_08_14_00.sql
Normal file
@@ -0,0 +1,7 @@
|
||||
-- uncomment and fix following line at next revision / updates archivation
|
||||
-- ALTER TABLE auth_db_version CHANGE COLUMN xxxx_xx_xx_xx xxxx_xx_xx_xx bit;
|
||||
|
||||
--
|
||||
-- Do not remove this file when we archive sql under this folder
|
||||
-- it is needed for pending sql importer
|
||||
--
|
||||
4
data/sql/old/db_characters/1.x/2016_08_15_00.sql
Normal file
4
data/sql/old/db_characters/1.x/2016_08_15_00.sql
Normal file
@@ -0,0 +1,4 @@
|
||||
ALTER TABLE characters_db_version CHANGE COLUMN 2016_08_12_00 2016_08_15_00 bit;
|
||||
|
||||
ALTER TABLE `channels`
|
||||
ADD `ownership` tinyint(3) unsigned NOT NULL DEFAULT '1' AFTER `announce`;
|
||||
12
data/sql/old/db_characters/1.x/2016_08_25_00.sql
Normal file
12
data/sql/old/db_characters/1.x/2016_08_25_00.sql
Normal file
@@ -0,0 +1,12 @@
|
||||
ALTER TABLE characters_db_version CHANGE COLUMN 2016_08_15_00 2016_08_25_00 bit;
|
||||
|
||||
RENAME TABLE `characters_db_version` TO `version_db_characters`;
|
||||
|
||||
ALTER TABLE `version_db_characters`
|
||||
ADD COLUMN `sql_rev` VARCHAR(100) NOT NULL FIRST,
|
||||
ADD COLUMN `required_rev` VARCHAR(100) NULL AFTER `sql_rev`,
|
||||
ADD PRIMARY KEY (`sql_rev`),
|
||||
ENGINE=INNODB;
|
||||
|
||||
ALTER TABLE `version_db_characters` ADD CONSTRAINT `required` FOREIGN KEY (`required_rev`) REFERENCES `version_db_characters`(`sql_rev`);
|
||||
|
||||
Reference in New Issue
Block a user