diff options
author | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2011-08-30 20:31:46 +0200 |
---|---|---|
committer | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2011-08-30 20:31:46 +0200 |
commit | ca5afebc85cbf769122105904b512942272c0ea3 (patch) | |
tree | 180b9a00993a4a7eeca56eb4e4353c078f95a564 /src/sql/mysql | |
parent | a4d0b4d6e0360f09b1f01ec59f548cdb297ebd4c (diff) | |
download | manaserv-ca5afebc85cbf769122105904b512942272c0ea3.tar.gz manaserv-ca5afebc85cbf769122105904b512942272c0ea3.tar.xz manaserv-ca5afebc85cbf769122105904b512942272c0ea3.zip |
Added missing sql update scripts.
Diffstat (limited to 'src/sql/mysql')
-rw-r--r-- | src/sql/mysql/createTables.sql | 2 | ||||
-rw-r--r-- | src/sql/mysql/updates/update_14_to_15.sql | 22 |
2 files changed, 23 insertions, 1 deletions
diff --git a/src/sql/mysql/createTables.sql b/src/sql/mysql/createTables.sql index d017cee..041e88d 100644 --- a/src/sql/mysql/createTables.sql +++ b/src/sql/mysql/createTables.sql @@ -421,7 +421,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,'14', NOW()); +INSERT INTO mana_world_states VALUES('database_version', NULL,'15', NOW()); -- all known transaction codes diff --git a/src/sql/mysql/updates/update_14_to_15.sql b/src/sql/mysql/updates/update_14_to_15.sql new file mode 100644 index 0000000..1036817 --- /dev/null +++ b/src/sql/mysql/updates/update_14_to_15.sql @@ -0,0 +1,22 @@ + +-- Dropping the table will only unequip characters, so it's not an issue. +DROP TABLE mana_char_equips; + +-- Recreate the table using the latest definition. +CREATE TABLE IF NOT EXISTS `mana_char_equips` ( + `id` int(10) unsigned NOT NULL auto_increment, + `owner_id` int(10) unsigned NOT NULL, + `slot_type` int(10) unsigned NOT NULL, + `item_id` int(10) unsigned NOT NULL, + `item_instance` int(10) unsigned NOT NULL, + -- + PRIMARY KEY (`id`), + FOREIGN KEY (`owner_id`) REFERENCES `mana_characters` (`id`) +) ENGINE=InnoDB +DEFAULT CHARSET=utf8; + +-- Update database version. +UPDATE mana_world_states +SET value = '15', +moddate = UNIX_TIMESTAMP() +WHERE state_name = 'database_version'; |