diff options
Diffstat (limited to 'src/sql')
-rw-r--r-- | src/sql/sqlite/createTables.sql | 8 | ||||
-rw-r--r-- | src/sql/sqlite/updates/update_2_to_3.sql | 17 |
2 files changed, 25 insertions, 0 deletions
diff --git a/src/sql/sqlite/createTables.sql b/src/sql/sqlite/createTables.sql index 68d4ed58..11478d9b 100644 --- a/src/sql/sqlite/createTables.sql +++ b/src/sql/sqlite/createTables.sql @@ -212,6 +212,14 @@ CREATE TABLE tmw_post_attachments CREATE INDEX tmw_post_attachments_ltr ON tmw_post_attachments ( letter_id ); CREATE INDEX tmw_post_attachments_itm ON tmw_post_attachments ( item_id ); +CREATE TABLE tmw_transactions +( + id INTEGER PRIMARY KEY, + char_id INTEGER NOT NULL, + action INTEGER NOT NULL, + message TEXT, + time INTEGER NOT NULL, +); CREATE TABLE tmw_online_list ( diff --git a/src/sql/sqlite/updates/update_2_to_3.sql b/src/sql/sqlite/updates/update_2_to_3.sql new file mode 100644 index 00000000..b2e4834d --- /dev/null +++ b/src/sql/sqlite/updates/update_2_to_3.sql @@ -0,0 +1,17 @@ + +-- add table tmw_online_list to store online users +CREATE TABLE tmw_transactions +( + id INTEGER PRIMARY KEY, + char_id INTEGER NOT NULL, + action INTEGER NOT NULL, + message TEXT, + time INTEGER NOT NULL, +); + +-- update the database version, and set date of update +UPDATE tmw_world_states + SET value = '3', + moddate = strftime('%s','now') + WHERE state_name = 'database_version'; + |