summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChuck Miller <shadowmil@gmail.com>2010-01-16 15:37:27 -0500
committerChuck Miller <shadowmil@gmail.com>2010-01-16 15:38:03 -0500
commitbb7866f0f5046c82f73cf625adbdeaf101920cbb (patch)
treeb3d22fc49c60fe7194ef8e397fa444cb67df58e4 /src
parent747e64a5fabe3feec6b3bc6f478baadb2a2b0ba5 (diff)
downloadmanaserv-bb7866f0f5046c82f73cf625adbdeaf101920cbb.tar.gz
manaserv-bb7866f0f5046c82f73cf625adbdeaf101920cbb.tar.bz2
manaserv-bb7866f0f5046c82f73cf625adbdeaf101920cbb.tar.xz
manaserv-bb7866f0f5046c82f73cf625adbdeaf101920cbb.zip
Updates mysql to database version 8
Diffstat (limited to 'src')
-rw-r--r--src/sql/mysql/createTables.sql16
-rw-r--r--src/sql/mysql/updates/update_7_to_8.sql17
2 files changed, 31 insertions, 2 deletions
diff --git a/src/sql/mysql/createTables.sql b/src/sql/mysql/createTables.sql
index 0b75710e..cd50c187 100644
--- a/src/sql/mysql/createTables.sql
+++ b/src/sql/mysql/createTables.sql
@@ -89,7 +89,19 @@ CREATE TABLE IF NOT EXISTS `mana_char_status_effects` (
) ENGINE=InnoDB
DEFAULT CHARSET=utf8;
+-- Create table 'mana_char_kill_stats'
+CREATE TABLE IF NOT EXISTS `mana_char_kill_stats`
+(
+ `char_id` int(11) NOT NULL,
+ `monster_id` int(11) NOT NULL,
+ `kills` int(11),
+ PRIMANY KEY (`char_id`, `monster_id`),
+ FOREIGN KEY (`char_id`)
+ REFERENCES `mana_characters` (`id`)
+ ON DELETE CASCADE
+) ENGINE=InnoDB
+DEFAULT CHARSET=utf8;
--
@@ -371,7 +383,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,'7', NOW());
+INSERT INTO mana_world_states VALUES('database_version', NULL,'8', NOW());
-- all known transaction codes
@@ -406,4 +418,4 @@ INSERT INTO mana_transaction_codes VALUES ( 28, 'Trade ended', 'Act
INSERT INTO mana_transaction_codes VALUES ( 29, 'Trade money', 'Actions' );
INSERT INTO mana_transaction_codes VALUES ( 30, 'Trade items', 'Actions' );
INSERT INTO mana_transaction_codes VALUES ( 31, 'Attribute increased', 'Character' );
-INSERT INTO mana_transaction_codes VALUES ( 32, 'Attribute decreased', 'Character' ); \ No newline at end of file
+INSERT INTO mana_transaction_codes VALUES ( 32, 'Attribute decreased', 'Character' );
diff --git a/src/sql/mysql/updates/update_7_to_8.sql b/src/sql/mysql/updates/update_7_to_8.sql
new file mode 100644
index 00000000..6abb9f1f
--- /dev/null
+++ b/src/sql/mysql/updates/update_7_to_8.sql
@@ -0,0 +1,17 @@
+
+-- Create table 'mana_char_kill_stats'
+
+CREATE TABLE IF NOT EXISTS `mana_char_kill_stats`
+(
+ `char_id` int(11) NOT NULL,
+ `monster_id` int(11) NOT NULL,
+ `kills` int(11),
+ PRIMANY KEY (`char_id`, `monster_id`),
+ FOREIGN KEY (`char_id`)
+ REFERENCES `mana_characters` (`id`)
+ ON DELETE CASCADE
+) ENGINE=InnoDB
+DEFAULT CHARSET=utf8;
+
+UPDATE mana_world_states SET value = '8' WHERE state_name = 'database_version';
+