aboutsummaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
Diffstat (limited to 'sql')
-rw-r--r--sql/updates/7015_01_mangos_item_template.sql14
-rw-r--r--sql/updates/TBC-WLK_world.sql9
2 files changed, 23 insertions, 0 deletions
diff --git a/sql/updates/7015_01_mangos_item_template.sql b/sql/updates/7015_01_mangos_item_template.sql
new file mode 100644
index 00000000000..bdf9a92e796
--- /dev/null
+++ b/sql/updates/7015_01_mangos_item_template.sql
@@ -0,0 +1,14 @@
+ALTER TABLE db_version CHANGE COLUMN required_7002_01_mangos_spell_chain required_7015_01_mangos_item_template bit;
+
+UPDATE item_template
+ SET maxcount = 0 WHERE maxcount > 32000;
+
+UPDATE item_template
+ SET stackable = 0 WHERE stackable > 32000;
+
+ALTER TABLE item_template
+ CHANGE COLUMN maxcount maxcount smallint(5) NOT NULL default '-1',
+ CHANGE COLUMN stackable stackable smallint(5) NOT NULL default '1';
+
+UPDATE item_template
+ SET stackable = -1 WHERE stackable = 0;
diff --git a/sql/updates/TBC-WLK_world.sql b/sql/updates/TBC-WLK_world.sql
index 56292c12504..7106fecc508 100644
--- a/sql/updates/TBC-WLK_world.sql
+++ b/sql/updates/TBC-WLK_world.sql
@@ -19,6 +19,15 @@ alter table `item_template`
add column `StatsCount` tinyint(3) UNSIGNED DEFAULT '0' NOT NULL after `ContainerSlots`,
CHANGE COLUMN `TotemCategory` `TotemCategory` mediumint(9) NOT NULL default '0';
+UPDATE item_template
+ SET maxcount = 0 WHERE maxcount > 32000;
+UPDATE item_template
+ SET stackable = 0 WHERE stackable > 32000;
+ALTER TABLE item_template
+ CHANGE COLUMN maxcount maxcount smallint(5) NOT NULL default '-1',
+ CHANGE COLUMN stackable stackable smallint(5) NOT NULL default '1';
+UPDATE item_template
+ SET stackable = -1 WHERE stackable = 0;
alter table `quest_template`
add column `PlayersSlain` tinyint(3) UNSIGNED DEFAULT '0' NOT NULL after `CharTitleId`,