From 5f03e73484a50c9689956b32ef97630b56d2a00d Mon Sep 17 00:00:00 2001 From: Yohann Ferreira Date: Wed, 29 Dec 2010 07:41:49 +0100 Subject: Made the server handle properly the characters slots. I turned the vector storing character data into a map, keeping the character's slot. Fixed a memleak along the way. Reviewed-by: Crush. --- src/sql/sqlite/createTables.sql | 1 + src/sql/sqlite/updates/update_13_to_14.sql | 10 ++++++++++ 2 files changed, 11 insertions(+) create mode 100644 src/sql/sqlite/updates/update_13_to_14.sql (limited to 'src/sql/sqlite') diff --git a/src/sql/sqlite/createTables.sql b/src/sql/sqlite/createTables.sql index 3ab59d7..8296a7e 100644 --- a/src/sql/sqlite/createTables.sql +++ b/src/sql/sqlite/createTables.sql @@ -55,6 +55,7 @@ CREATE TABLE mana_characters x INTEGER NOT NULL, y INTEGER NOT NULL, map_id INTEGER NOT NULL, + slot INTEGER NOT NULL, -- FOREIGN KEY (user_id) REFERENCES mana_accounts(id) ); diff --git a/src/sql/sqlite/updates/update_13_to_14.sql b/src/sql/sqlite/updates/update_13_to_14.sql new file mode 100644 index 0000000..a4c4a38 --- /dev/null +++ b/src/sql/sqlite/updates/update_13_to_14.sql @@ -0,0 +1,10 @@ + +-- Add the slot column to table mana_characters +ALTER TABLE mana_characters ADD slot INTEGER NOT NULL; + +-- Update the database version, and set date of update +UPDATE mana_world_states + SET value = '14', + moddate = strftime('%s','now') + WHERE state_name = 'database_version'; + -- cgit