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

-- Dropping the table will only unequip characters, so it's not an issue.
DROP TABLE mana_char_equips;

-- Recreate the table using the latest definition.
CREATE TABLE mana_char_equips
(
    id               INTEGER    PRIMARY KEY,
    owner_id         INTEGER    NOT NULL,
    slot_type        INTEGER    NOT NULL,
    item_id          INTEGER    NOT NULL,
    item_instance    INTEGER    NOT NULL,
    --
    FOREIGN KEY (owner_id) REFERENCES mana_characters(id)
);

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