diff options
-rw-r--r-- | src/account-server/storage.cpp | 2 | ||||
-rw-r--r-- | src/sql/sqlite/createTables.sql | 2 | ||||
-rw-r--r-- | src/sql/sqlite/updates/update_9_to_10.sql | 9 |
3 files changed, 11 insertions, 2 deletions
diff --git a/src/account-server/storage.cpp b/src/account-server/storage.cpp index cdf466d5..efaf40b8 100644 --- a/src/account-server/storage.cpp +++ b/src/account-server/storage.cpp @@ -39,7 +39,7 @@ static const char *DEFAULT_ITEM_FILE = "items.xml"; // defines the supported db version static const char *DB_VERSION_PARAMETER = "database_version"; -static const char *SUPPORTED_DB_VERSION = "9"; +static const char *SUPPORTED_DB_VERSION = "10"; /* * MySQL specificities: diff --git a/src/sql/sqlite/createTables.sql b/src/sql/sqlite/createTables.sql index bc5eefba..586c0be9 100644 --- a/src/sql/sqlite/createTables.sql +++ b/src/sql/sqlite/createTables.sql @@ -106,7 +106,7 @@ CREATE TABLE mana_char_kill_stats FOREIGN KEY (char_id) REFERENCES mana_characters(id) ); -CREATE INDEX mana_char_kill_stats_char on mana_char_status_effects ( char_id ); +CREATE INDEX mana_char_kill_stats_char on mana_char_kill_stats ( char_id ); ----------------------------------------------------------------------------- diff --git a/src/sql/sqlite/updates/update_9_to_10.sql b/src/sql/sqlite/updates/update_9_to_10.sql new file mode 100644 index 00000000..6340fe47 --- /dev/null +++ b/src/sql/sqlite/updates/update_9_to_10.sql @@ -0,0 +1,9 @@ +DROP INDEX mana_char_kill_stats_char; +CREATE INDEX mana_char_kill_stats_char on mana_char_kill_stats ( char_id ); + +-- update the database version, and set date of update +UPDATE mana_world_states + SET value = '10', + moddate = strftime('%s','now') + WHERE state_name = 'database_version'; + |