From 73f1933f94bcadb8c3b3f9763e6afad5f02891f4 Mon Sep 17 00:00:00 2001
From: Erik Schilling <ablu.erikschilling@googlemail.com>
Date: Mon, 23 Sep 2013 22:37:15 +0200
Subject: Store questlog values in the database

---
 src/sql/sqlite/createTables.sql | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

(limited to 'src/sql/sqlite/createTables.sql')

diff --git a/src/sql/sqlite/createTables.sql b/src/sql/sqlite/createTables.sql
index 95dc5a23..437a0546 100644
--- a/src/sql/sqlite/createTables.sql
+++ b/src/sql/sqlite/createTables.sql
@@ -110,7 +110,7 @@ CREATE TABLE mana_char_abilities
 (
     char_id                 INTEGER     NOT NULL,
     ability_id              INTEGER     NOT NULL,
-	PRIMARY KEY (char_id, ability_id),
+    PRIMARY KEY (char_id, ability_id),
     FOREIGN KEY (char_id) REFERENCES mana_characters(id)
 );
 
@@ -347,6 +347,21 @@ CREATE TABLE mana_online_list
     FOREIGN KEY (char_id) REFERENCES mana_characters(id)
 );
 
+-----------------------------------------------------------------------------
+
+CREATE TABLE mana_questlog
+(
+    char_id           INTEGER     NOT NULL,
+    quest_id          INTEGER     NOT NULL,
+    quest_state       INTEGER     NOT NULL,
+    quest_title       TEXT        NOT NULL,
+    quest_description TEXT        NOT NULL,
+    --
+    FOREIGN KEY (char_id) REFERENCES mana_characters(id)
+);
+CREATE INDEX mana_questlog_char_id ON mana_questlog ( char_id );
+CREATE INDEX mana_questlog_quest_id ON mana_questlog ( quest_id );
+
 -----------------------------------------------------------------------------
 -- Views
 -----------------------------------------------------------------------------
@@ -396,7 +411,7 @@ AS
 
 INSERT INTO mana_world_states VALUES('accountserver_startup',-1,'0', strftime('%s','now'));
 INSERT INTO mana_world_states VALUES('accountserver_version',-1,'0', strftime('%s','now'));
-INSERT INTO mana_world_states VALUES('database_version',     -1,'25', strftime('%s','now'));
+INSERT INTO mana_world_states VALUES('database_version',     -1,'26', strftime('%s','now'));
 
 -- all known transaction codes
 
-- 
cgit v1.2.3-60-g2f50

