diff options
Diffstat (limited to 'src/sql/mysql')
-rw-r--r-- | src/sql/mysql/createTables.sql | 18 | ||||
-rw-r--r-- | src/sql/mysql/updates/update_16_to_17.sql | 19 |
2 files changed, 36 insertions, 1 deletions
diff --git a/src/sql/mysql/createTables.sql b/src/sql/mysql/createTables.sql index f6365031..b75fc0ed 100644 --- a/src/sql/mysql/createTables.sql +++ b/src/sql/mysql/createTables.sql @@ -179,6 +179,22 @@ DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- +-- table: `mana_floor_items` +-- +CREATE TABLE IF NOT EXISTS `mana_floor_items` ( + `id` int(10) unsigned NOT NULL auto_increment, + `map_id` int(10) unsigned NOT NULL, + `item_id` int(10) unsigned NOT NULL, + `amount` smallint(5) unsigned NOT NULL, + `pos_x` smallint(5) unsigned NOT NULL, + `pos_y` smallint(5) unsigned NOT NULL, + -- + PRIMARY KEY (`id`) +) ENGINE=InnoDB +DEFAULT CHARSET=utf8 +AUTO_INCREMENT=1 ; + +-- -- table: `mana_char_equips` -- CREATE TABLE IF NOT EXISTS `mana_char_equips` ( @@ -421,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,'16', NOW()); +INSERT INTO mana_world_states VALUES('database_version', NULL,'17', NOW()); -- all known transaction codes diff --git a/src/sql/mysql/updates/update_16_to_17.sql b/src/sql/mysql/updates/update_16_to_17.sql new file mode 100644 index 00000000..008983aa --- /dev/null +++ b/src/sql/mysql/updates/update_16_to_17.sql @@ -0,0 +1,19 @@ +-- Create the new floor item table +CREATE TABLE IF NOT EXISTS `mana_floor_items` ( + `id` int(10) unsigned NOT NULL auto_increment, + `map_id` int(10) unsigned NOT NULL, + `item_id` int(10) unsigned NOT NULL, + `amount` smallint(5) unsigned NOT NULL, + `pos_x` smallint(5) unsigned NOT NULL, + `pos_y` smallint(5) unsigned NOT NULL, + -- + PRIMARY KEY (`id`) +) ENGINE=InnoDB +DEFAULT CHARSET=utf8 +AUTO_INCREMENT=1 ; + +-- Update database version. +UPDATE mana_world_states +SET value = '17', +moddate = UNIX_TIMESTAMP() +WHERE state_name = 'database_version'; |