summaryrefslogtreecommitdiff
path: root/src/sql/mysql
diff options
context:
space:
mode:
authorErik Schilling <ablu.erikschilling@googlemail.com>2011-12-03 03:48:33 +0800
committerErik Schilling <ablu.erikschilling@googlemail.com>2011-12-03 18:19:37 +0800
commit05aa5c78d64033f9f10184f49081c68a951ae754 (patch)
treeac4e5cda47858524f3f295b1415ad3707a29f4bf /src/sql/mysql
parentefe49d70045098d067124ac5e9e2f9a73ecd78f1 (diff)
downloadmanaserv-05aa5c78d64033f9f10184f49081c68a951ae754.tar.gz
manaserv-05aa5c78d64033f9f10184f49081c68a951ae754.tar.bz2
manaserv-05aa5c78d64033f9f10184f49081c68a951ae754.tar.xz
manaserv-05aa5c78d64033f9f10184f49081c68a951ae754.zip
Allowed larger item amounts for mysql database.
Changed range of amount to unsigned int(10). Sqlite update scripts is empty since no change was required here. Reviewed-by: Bertram.
Diffstat (limited to 'src/sql/mysql')
-rw-r--r--src/sql/mysql/createTables.sql4
-rw-r--r--src/sql/mysql/updates/update_18_to_19.sql7
2 files changed, 9 insertions, 2 deletions
diff --git a/src/sql/mysql/createTables.sql b/src/sql/mysql/createTables.sql
index dffbf8f0..a48644b3 100644
--- a/src/sql/mysql/createTables.sql
+++ b/src/sql/mysql/createTables.sql
@@ -152,7 +152,7 @@ AUTO_INCREMENT=1 ;
CREATE TABLE IF NOT EXISTS `mana_item_instances` (
`item_id` int(10) unsigned NOT NULL auto_increment,
`itemclass_id` int(10) unsigned NOT NULL,
- `amount` tinyint(3) unsigned NOT NULL,
+ `amount` int(10) unsigned NOT NULL,
--
PRIMARY KEY (`item_id`),
FOREIGN KEY (`itemclass_id`)
@@ -437,7 +437,7 @@ AUTO_INCREMENT=0 ;
INSERT INTO mana_world_states VALUES('accountserver_startup',NULL,NULL, NOW());
INSERT INTO mana_world_states VALUES('accountserver_version',NULL,NULL, NOW());
-INSERT INTO mana_world_states VALUES('database_version', NULL,'18', NOW());
+INSERT INTO mana_world_states VALUES('database_version', NULL,'19', NOW());
-- all known transaction codes
diff --git a/src/sql/mysql/updates/update_18_to_19.sql b/src/sql/mysql/updates/update_18_to_19.sql
new file mode 100644
index 00000000..b52ce487
--- /dev/null
+++ b/src/sql/mysql/updates/update_18_to_19.sql
@@ -0,0 +1,7 @@
+ALTER TABLE mana_item_instances CHANGE amount amount int(10) unsigned NOT NULL;
+
+-- Update database version.
+UPDATE mana_world_states
+SET value = '19',
+moddate = UNIX_TIMESTAMP()
+WHERE state_name = 'database_version';