summaryrefslogtreecommitdiff
path: root/src/sql/mysql
diff options
context:
space:
mode:
Diffstat (limited to 'src/sql/mysql')
-rw-r--r--src/sql/mysql/createTables.sql20
-rw-r--r--src/sql/mysql/updates/update_22_to_23.sql15
2 files changed, 16 insertions, 19 deletions
diff --git a/src/sql/mysql/createTables.sql b/src/sql/mysql/createTables.sql
index 212d4812..50fdae90 100644
--- a/src/sql/mysql/createTables.sql
+++ b/src/sql/mysql/createTables.sql
@@ -33,7 +33,6 @@ CREATE TABLE IF NOT EXISTS `mana_characters` (
`gender` tinyint(3) unsigned NOT NULL,
`hair_style` tinyint(3) unsigned NOT NULL,
`hair_color` tinyint(3) unsigned NOT NULL,
- `level` tinyint(3) unsigned NOT NULL,
`char_pts` smallint(5) unsigned NOT NULL,
`correct_pts` smallint(5) unsigned NOT NULL,
-- location on the map
@@ -70,21 +69,6 @@ CREATE TABLE IF NOT EXISTS `mana_char_attr` (
DEFAULT CHARSET=utf8;
--
--- table: `mana_char_skills`
---
-CREATE TABLE IF NOT EXISTS `mana_char_skills` (
- `char_id` int(10) unsigned NOT NULL,
- `skill_id` smallint(5) unsigned NOT NULL,
- `skill_exp` smallint(5) unsigned NOT NULL,
- --
- PRIMARY KEY (`char_id`, `skill_id`),
- FOREIGN KEY (`char_id`)
- REFERENCES `mana_characters` (`id`)
- ON DELETE CASCADE
-) ENGINE=InnoDB
-DEFAULT CHARSET=utf8;
-
---
-- table: `mana_char_status_effects`
--
CREATE TABLE IF NOT EXISTS `mana_char_status_effects` (
@@ -417,7 +401,6 @@ AS
c.user_id as user_id,
c.name as name,
c.gender as gender,
- c.level as level,
c.map_id as map_id
FROM mana_online_list l
JOIN mana_characters c
@@ -438,7 +421,7 @@ AUTO_INCREMENT=0 ;
INSERT INTO mana_world_states VALUES('accountserver_startup',-1,'0', NOW());
INSERT INTO mana_world_states VALUES('accountserver_version',-1,'0', NOW());
-INSERT INTO mana_world_states VALUES('database_version', -1,'22', NOW());
+INSERT INTO mana_world_states VALUES('database_version', -1,'23', NOW());
-- all known transaction codes
@@ -475,7 +458,6 @@ INSERT INTO mana_transaction_codes VALUES ( 30, 'Trade items', 'Act
INSERT INTO mana_transaction_codes VALUES ( 31, 'Attribute increased', 'Character' );
INSERT INTO mana_transaction_codes VALUES ( 32, 'Attribute decreased', 'Character' );
INSERT INTO mana_transaction_codes VALUES ( 33, 'Command MUTE', 'Commands' );
-INSERT INTO mana_transaction_codes VALUES ( 34, 'Command EXP', 'Commands' );
INSERT INTO mana_transaction_codes VALUES ( 35, 'Command INVISIBLE', 'Commands' );
INSERT INTO mana_transaction_codes VALUES ( 36, 'Command COMBAT', 'Commands' );
INSERT INTO mana_transaction_codes VALUES ( 37, 'Command ANNOUNCE', 'Commands' );
diff --git a/src/sql/mysql/updates/update_22_to_23.sql b/src/sql/mysql/updates/update_22_to_23.sql
new file mode 100644
index 00000000..c4affaed
--- /dev/null
+++ b/src/sql/mysql/updates/update_22_to_23.sql
@@ -0,0 +1,15 @@
+START TRANSACTION;
+
+-- There is no way to convert all your skills to attributes. You will have to
+-- do this manually.
+
+ALTER TABLE mana_characters DROP COLUMN level;
+
+-- Update database version.
+UPDATE mana_world_states
+ SET value = '23',
+ moddate = UNIX_TIMESTAMP()
+ WHERE state_name = 'database_version';
+
+COMMIT;
+