From 410f448669a2ed843ff0b412924c04c8fbe87458 Mon Sep 17 00:00:00 2001
From: Andreas Habel <mail@exceptionfault.de>
Date: Fri, 19 Sep 2008 12:50:53 +0000
Subject: * Doxygen now writes all warnings into a separate file * Added link
 to wiki documentation as comment into tmwserv.xml * Added table
 tmw_char_skills to store skills of a character and removed weapon skills from
 table tmw_characters.

---
 src/sql/sqlite/createTables.sql | 25 ++++++++++++++-----------
 1 file changed, 14 insertions(+), 11 deletions(-)

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

diff --git a/src/sql/sqlite/createTables.sql b/src/sql/sqlite/createTables.sql
index 4ff336b..ba7fa5e 100644
--- a/src/sql/sqlite/createTables.sql
+++ b/src/sql/sqlite/createTables.sql
@@ -34,21 +34,24 @@ CREATE TABLE tmw_characters
    vit          INTEGER     NOT NULL,
    int          INTEGER     NOT NULL,
    will         INTEGER     NOT NULL,
-   unarmed_exp  INTEGER     NOT NULL,
-   knife_exp    INTEGER     NOT NULL,
-   sword_exp    INTEGER     NOT NULL,
-   polearm_exp  INTEGER     NOT NULL,
-   staff_exp    INTEGER     NOT NULL,
-   whip_exp     INTEGER     NOT NULL,
-   bow_exp      INTEGER     NOT NULL,
-   shoot_exp    INTEGER     NOT NULL,
-   mace_exp     INTEGER     NOT NULL,
-   axe_exp      INTEGER     NOT NULL,
-   thrown_exp   INTEGER     NOT NULL,
    --
    FOREIGN KEY (user_id) REFERENCES tmw_accounts(id)
 );
 
+CREATE INDEX tmw_characters_user ON tmw_characters ( user_id );
+CREATE UNIQUE INDEX tmw_characters_name ON tmw_characters ( name );
+
+CREATE TABLE tmw_char_skills 
+(
+    char_id     INTEGER     NOT NULL,
+    skill_id    INTEGER     NOT NULL,
+    skill_exp   INTEGER     NOT NULL,
+    --
+    FOREIGN KEY (char_id) REFERENCES tmw_characters(id)
+);
+
+CREATE INDEX tmw_char_skills_char ON tmw_char_skills ( char_id );
+
 CREATE TABLE tmw_inventories 
 (
    id           INTEGER     PRIMARY KEY,
-- 
cgit 

