diff options
author | David Athay <ko2fan@gmail.com> | 2009-03-05 14:30:19 +0000 |
---|---|---|
committer | David Athay <ko2fan@gmail.com> | 2009-03-05 14:30:19 +0000 |
commit | be548ff54b8fa60a8a778714cd8fa5326722c0aa (patch) | |
tree | 5b68e5363fd592b4402944c298f77f3bf2b60f0e /src/sql | |
parent | 30a6139d35938d9e86b33e32d5e5b111a16db937 (diff) | |
download | manaserv-be548ff54b8fa60a8a778714cd8fa5326722c0aa.tar.gz manaserv-be548ff54b8fa60a8a778714cd8fa5326722c0aa.tar.bz2 manaserv-be548ff54b8fa60a8a778714cd8fa5326722c0aa.tar.xz manaserv-be548ff54b8fa60a8a778714cd8fa5326722c0aa.zip |
Added transactional history
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'; + |