Inventory update work-around [ci skip]

This commit is contained in:
Uleat 2018-10-22 22:27:05 -04:00
parent 9f039b47e9
commit 84643ce9a1
3 changed files with 65 additions and 62 deletions

View File

@ -381,8 +381,8 @@
9125|2018_07_20_task_emote.sql|SHOW COLUMNS FROM `tasks` LIKE 'completion_emote'|empty|
9126|2018_09_07_FastRegen.sql|SHOW COLUMNS FROM `zone` LIKE 'fast_regen_hp'|empty|
9127|2018_09_07_NPCMaxAggroDist.sql|SHOW COLUMNS FROM `zone` LIKE 'npc_max_aggro_dist'|empty|
9128|2018_08_13_inventory_version_update.sql|SHOW TABLES LIKE 'inventory_versions'|empty|
9129|2018_08_13_inventory_update.sql|SELECT * FROM `inventory_versions` WHERE `version` = 2 and `step` = 0|not_empty|
9128|2018_08_13_inventory_version_update.sql|SHOW TABLES LIKE 'inventory_version'|not_empty|
9129|2018_08_13_inventory_update.sql|SHOW TABLES LIKE 'inventory_versions'|empty|
# Upgrade conditions:
# This won't be needed after this system is implemented, but it is used database that are not

View File

@ -1,3 +1,66 @@
DROP TABLE IF EXISTS `inventory_versions`;
DROP TABLE IF EXISTS `inventory_snapshots`;
CREATE TABLE `inventory_versions` (
`version` INT(11) UNSIGNED NOT NULL DEFAULT '0',
`step` INT(11) UNSIGNED NOT NULL DEFAULT '0',
`bot_step` INT(11) UNSIGNED NOT NULL DEFAULT '0'
)
COLLATE='latin1_swedish_ci'
ENGINE=MyISAM;
INSERT INTO `inventory_versions` VALUES (2, 0, 0);
CREATE TABLE `inventory_snapshots` (
`time_index` INT(11) UNSIGNED NOT NULL DEFAULT '0',
`charid` INT(11) UNSIGNED NOT NULL DEFAULT '0',
`slotid` MEDIUMINT(7) UNSIGNED NOT NULL DEFAULT '0',
`itemid` INT(11) UNSIGNED NULL DEFAULT '0',
`charges` SMALLINT(3) UNSIGNED NULL DEFAULT '0',
`color` INT(11) UNSIGNED NOT NULL DEFAULT '0',
`augslot1` MEDIUMINT(7) UNSIGNED NOT NULL DEFAULT '0',
`augslot2` MEDIUMINT(7) UNSIGNED NOT NULL DEFAULT '0',
`augslot3` MEDIUMINT(7) UNSIGNED NOT NULL DEFAULT '0',
`augslot4` MEDIUMINT(7) UNSIGNED NOT NULL DEFAULT '0',
`augslot5` MEDIUMINT(7) UNSIGNED NULL DEFAULT '0',
`augslot6` MEDIUMINT(7) NOT NULL DEFAULT '0',
`instnodrop` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0',
`custom_data` TEXT NULL,
`ornamenticon` INT(11) UNSIGNED NOT NULL DEFAULT '0',
`ornamentidfile` INT(11) UNSIGNED NOT NULL DEFAULT '0',
`ornament_hero_model` INT(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`time_index`, `charid`, `slotid`)
)
COLLATE='latin1_swedish_ci'
ENGINE=InnoDB;
CREATE TABLE `inventory_snapshots_v1_bak` (
`time_index` INT(11) UNSIGNED NOT NULL DEFAULT '0',
`charid` INT(11) UNSIGNED NOT NULL DEFAULT '0',
`slotid` MEDIUMINT(7) UNSIGNED NOT NULL DEFAULT '0',
`itemid` INT(11) UNSIGNED NULL DEFAULT '0',
`charges` SMALLINT(3) UNSIGNED NULL DEFAULT '0',
`color` INT(11) UNSIGNED NOT NULL DEFAULT '0',
`augslot1` MEDIUMINT(7) UNSIGNED NOT NULL DEFAULT '0',
`augslot2` MEDIUMINT(7) UNSIGNED NOT NULL DEFAULT '0',
`augslot3` MEDIUMINT(7) UNSIGNED NOT NULL DEFAULT '0',
`augslot4` MEDIUMINT(7) UNSIGNED NOT NULL DEFAULT '0',
`augslot5` MEDIUMINT(7) UNSIGNED NULL DEFAULT '0',
`augslot6` MEDIUMINT(7) NOT NULL DEFAULT '0',
`instnodrop` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0',
`custom_data` TEXT NULL,
`ornamenticon` INT(11) UNSIGNED NOT NULL DEFAULT '0',
`ornamentidfile` INT(11) UNSIGNED NOT NULL DEFAULT '0',
`ornament_hero_model` INT(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`time_index`, `charid`, `slotid`)
)
COLLATE='latin1_swedish_ci'
ENGINE=InnoDB;
-- create inventory v1 backup
SELECT @pre_timestamp := UNIX_TIMESTAMP(NOW());
INSERT INTO `inventory_snapshots_v1_bak`

View File

@ -1,61 +1 @@
DROP TABLE IF EXISTS `inventory_version`;
DROP TABLE IF EXISTS `inventory_snapshots`;
CREATE TABLE `inventory_versions` (
`version` INT(11) UNSIGNED NOT NULL DEFAULT '0',
`step` INT(11) UNSIGNED NOT NULL DEFAULT '0',
`bot_step` INT(11) UNSIGNED NOT NULL DEFAULT '0'
)
COLLATE='latin1_swedish_ci'
ENGINE=MyISAM;
INSERT INTO `inventory_versions` VALUES (2, 0, 0);
CREATE TABLE `inventory_snapshots` (
`time_index` INT(11) UNSIGNED NOT NULL DEFAULT '0',
`charid` INT(11) UNSIGNED NOT NULL DEFAULT '0',
`slotid` MEDIUMINT(7) UNSIGNED NOT NULL DEFAULT '0',
`itemid` INT(11) UNSIGNED NULL DEFAULT '0',
`charges` SMALLINT(3) UNSIGNED NULL DEFAULT '0',
`color` INT(11) UNSIGNED NOT NULL DEFAULT '0',
`augslot1` MEDIUMINT(7) UNSIGNED NOT NULL DEFAULT '0',
`augslot2` MEDIUMINT(7) UNSIGNED NOT NULL DEFAULT '0',
`augslot3` MEDIUMINT(7) UNSIGNED NOT NULL DEFAULT '0',
`augslot4` MEDIUMINT(7) UNSIGNED NOT NULL DEFAULT '0',
`augslot5` MEDIUMINT(7) UNSIGNED NULL DEFAULT '0',
`augslot6` MEDIUMINT(7) NOT NULL DEFAULT '0',
`instnodrop` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0',
`custom_data` TEXT NULL,
`ornamenticon` INT(11) UNSIGNED NOT NULL DEFAULT '0',
`ornamentidfile` INT(11) UNSIGNED NOT NULL DEFAULT '0',
`ornament_hero_model` INT(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`time_index`, `charid`, `slotid`)
)
COLLATE='latin1_swedish_ci'
ENGINE=InnoDB;
CREATE TABLE `inventory_snapshots_v1_bak` (
`time_index` INT(11) UNSIGNED NOT NULL DEFAULT '0',
`charid` INT(11) UNSIGNED NOT NULL DEFAULT '0',
`slotid` MEDIUMINT(7) UNSIGNED NOT NULL DEFAULT '0',
`itemid` INT(11) UNSIGNED NULL DEFAULT '0',
`charges` SMALLINT(3) UNSIGNED NULL DEFAULT '0',
`color` INT(11) UNSIGNED NOT NULL DEFAULT '0',
`augslot1` MEDIUMINT(7) UNSIGNED NOT NULL DEFAULT '0',
`augslot2` MEDIUMINT(7) UNSIGNED NOT NULL DEFAULT '0',
`augslot3` MEDIUMINT(7) UNSIGNED NOT NULL DEFAULT '0',
`augslot4` MEDIUMINT(7) UNSIGNED NOT NULL DEFAULT '0',
`augslot5` MEDIUMINT(7) UNSIGNED NULL DEFAULT '0',
`augslot6` MEDIUMINT(7) NOT NULL DEFAULT '0',
`instnodrop` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0',
`custom_data` TEXT NULL,
`ornamenticon` INT(11) UNSIGNED NOT NULL DEFAULT '0',
`ornamentidfile` INT(11) UNSIGNED NOT NULL DEFAULT '0',
`ornament_hero_model` INT(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`time_index`, `charid`, `slotid`)
)
COLLATE='latin1_swedish_ci'
ENGINE=InnoDB;