summaryrefslogtreecommitdiffstats
path: root/src/sql/mysql/updates
diff options
context:
space:
mode:
authorErik Schilling <ablu.erikschilling@googlemail.com>2013-04-13 12:32:22 +0200
committerErik Schilling <ablu.erikschilling@googlemail.com>2013-05-08 14:02:50 +0200
commit708896008ad8ea391d542ce37b9871318a84fb97 (patch)
tree30c862cb18d354f879ffb0b426d5ff133d2bde3b /src/sql/mysql/updates
parente2b6a4efe72333ab0e0761f4e9e8ce9eb29a5335 (diff)
downloadmanaserv-708896008ad8ea391d542ce37b9871318a84fb97.tar.gz
manaserv-708896008ad8ea391d542ce37b9871318a84fb97.tar.xz
manaserv-708896008ad8ea391d542ce37b9871318a84fb97.zip
[Abilities] Renamed specials to abilities
Diffstat (limited to 'src/sql/mysql/updates')
-rw-r--r--src/sql/mysql/updates/update_21_to_22.sql26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/sql/mysql/updates/update_21_to_22.sql b/src/sql/mysql/updates/update_21_to_22.sql
new file mode 100644
index 0000000..88c6f8c
--- /dev/null
+++ b/src/sql/mysql/updates/update_21_to_22.sql
@@ -0,0 +1,26 @@
+START TRANSACTION;
+
+CREATE TABLE mana_char_abilities
+(
+ `char_id` int(10) unsigned NOT NULL,
+ `ability_id` int(10) unsigned NOT NULL,
+ `ability_current_points` int(10) unsigned NOT NULL,
+ PRIMARY KEY (`char_id`, `ability_id`),
+ FOREIGN KEY (`char_id`)
+ REFERENCES `mana_characters` (`id`)
+ ON DELETE CASCADE
+) ENGINE=InnoDB
+DEFAULT CHARSET=utf8;
+
+INSERT INTO mana_char_abilities (char_id, ability_id, ability_current_points)
+ SELECT char_id, special_id, special_current_mana FROM mana_char_specials;
+
+DROP TABLE mana_char_specials;
+
+-- Update database version.
+UPDATE mana_world_states
+ SET value = '22',
+ moddate = UNIX_TIMESTAMP()
+ WHERE state_name = 'database_version';
+
+COMMIT;