summaryrefslogtreecommitdiff
path: root/src/sql/mysql/updates/update_10_to_11.sql
diff options
context:
space:
mode:
Diffstat (limited to 'src/sql/mysql/updates/update_10_to_11.sql')
-rw-r--r--src/sql/mysql/updates/update_10_to_11.sql49
1 files changed, 49 insertions, 0 deletions
diff --git a/src/sql/mysql/updates/update_10_to_11.sql b/src/sql/mysql/updates/update_10_to_11.sql
new file mode 100644
index 00000000..66922f14
--- /dev/null
+++ b/src/sql/mysql/updates/update_10_to_11.sql
@@ -0,0 +1,49 @@
+--
+-- Modify the table `mana_characters` to remove the no longer used columns.
+-- Note that this is not an intelligent update script at the moment - the
+-- values that were stored here are not currently being transferred
+-- into their replacement structures.
+--
+
+ALTER TABLE `mana_char_attr` DROP `money`;
+ALTER TABLE `mana_char_attr` DROP `str`;
+ALTER TABLE `mana_char_attr` DROP `agi`;
+ALTER TABLE `mana_char_attr` DROP `vit`;
+ALTER TABLE `mana_char_attr` DROP `int`;
+ALTER TABLE `mana_char_attr` DROP `dex`;
+ALTER TABLE `mana_char_attr` DROP `will`;
+
+
+--
+-- Create table: `mana_char_attr`
+--
+
+CREATE TABLE IF NOT EXISTS `mana_char_attr` (
+ `char_id` int(10) unsigned NOT NULL,
+ `attr_id` int(10) unsigned NOT NULL,
+ `attr_base` double unsigned NOT NULL,
+ `attr_mod` double unsigned NOT NULL,
+ --
+ PRIMARY KEY (`char_id`, `attr_id`),
+ FOREIGN KEY (`char_id`)
+ REFERENCES `mana_characters` (`id`)
+ ON DELETE CASCADE
+) ENGINE=InnoDB
+DEFAULT CHARSET=utf8;
+
+--
+-- table: `mana_char_equips`
+--
+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 tinyint(3) unsigned NOT NULL,
+ inventory_slot tinyint(3) unsigned NOT NULL,
+ --
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `owner_id` (`owner_id`, )
+ FOREIGN KEY (owner_id) REFERENCES mana_characters(id)
+) ENGINE=InnoDB
+DEFAULT CHARSET=utf8;
+
+UPDATE mana_world_states SET value = '11', moddate = UNIX_TIMESTAMP() WHERE state_name = 'database_version';