aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/9090_characters_item_instance.sql8
1 files changed, 7 insertions, 1 deletions
diff --git a/sql/updates/9090_characters_item_instance.sql b/sql/updates/9090_characters_item_instance.sql
index 89301903d2d..db6e3928d72 100644
--- a/sql/updates/9090_characters_item_instance.sql
+++ b/sql/updates/9090_characters_item_instance.sql
@@ -11,12 +11,18 @@ ALTER TABLE `item_instance`
ADD `durability` int(10) unsigned NOT NULL default '0' AFTER `randomPropertyId`,
ADD `playedTime` int(10) unsigned NOT NULL default '0' AFTER `durability`;
+-- Temporarily change delimiter to prevent SQL syntax errors
+DELIMITER ||
+
-- Function to convert ints from unsigned to signed
DROP FUNCTION IF EXISTS `uint32toint32`;
CREATE FUNCTION `uint32toint32`(input INT(10) UNSIGNED) RETURNS INT(11) SIGNED DETERMINISTIC
BEGIN
RETURN input;
-END;
+END||
+
+-- Restore original delimiter
+DELIMITER ;
-- Move data to new fields
UPDATE `item_instance` SET