diff options
-rw-r--r-- | src/common/manaserv_protocol.h | 2 | ||||
-rw-r--r-- | src/sql/mysql/createTables.sql | 4 | ||||
-rw-r--r-- | src/sql/mysql/updates/update_18_to_19.sql | 7 | ||||
-rw-r--r-- | src/sql/sqlite/createTables.sql | 2 | ||||
-rw-r--r-- | src/sql/sqlite/updates/update_18_to_19.sql | 9 |
5 files changed, 20 insertions, 4 deletions
diff --git a/src/common/manaserv_protocol.h b/src/common/manaserv_protocol.h index cfc2f4c1..13e7f8c1 100644 --- a/src/common/manaserv_protocol.h +++ b/src/common/manaserv_protocol.h @@ -26,7 +26,7 @@ namespace ManaServ { enum { PROTOCOL_VERSION = 1, - SUPPORTED_DB_VERSION = 18 + SUPPORTED_DB_VERSION = 19 }; /** 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'; diff --git a/src/sql/sqlite/createTables.sql b/src/sql/sqlite/createTables.sql index b2d94fb5..9a9dfe2e 100644 --- a/src/sql/sqlite/createTables.sql +++ b/src/sql/sqlite/createTables.sql @@ -419,7 +419,7 @@ AS INSERT INTO mana_world_states VALUES('accountserver_startup',NULL,NULL, strftime('%s','now')); INSERT INTO mana_world_states VALUES('accountserver_version',NULL,NULL, strftime('%s','now')); -INSERT INTO mana_world_states VALUES('database_version', NULL,'18', strftime('%s','now')); +INSERT INTO mana_world_states VALUES('database_version', NULL,'19', strftime('%s','now')); -- all known transaction codes diff --git a/src/sql/sqlite/updates/update_18_to_19.sql b/src/sql/sqlite/updates/update_18_to_19.sql new file mode 100644 index 00000000..8cd713e2 --- /dev/null +++ b/src/sql/sqlite/updates/update_18_to_19.sql @@ -0,0 +1,9 @@ +-- No change required. It was an mysql issue only + + +-- update the database version, and set date of update +UPDATE mana_world_states + SET value = '19', + moddate = strftime('%s','now') + WHERE state_name = 'database_version'; + |