summaryrefslogtreecommitdiffstats
path: root/src/sql/sqlite/updates/update_5_to_6.sql
blob: 8a1e552c16aff66d0d40a3635c36d8e089433a2d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

-- create table tmw_char_status_effects

CREATE TABLE tmw_char_status_effects
(
    char_id     INTEGER     NOT NULL,
    status_id   INTEGER     NOT NULL,
    status_time INTEGER     NOT NULL,
    --
    FOREIGN KEY (char_id) REFERENCES tmw_characters(id)
);

CREATE INDEX tmw_char_status_char on tmw_char_status_effects ( char_id );

-- update the database version, and set date of update
UPDATE tmw_world_states
   SET value      = '6',
       moddate    = strftime('%s','now')
 WHERE state_name = 'database_version';