summaryrefslogtreecommitdiffstats
path: root/src/sql/sqlite
diff options
context:
space:
mode:
authorPhilipp Sehmisch <crush@themanaworld.org>2009-03-05 19:40:40 +0100
committerPhilipp Sehmisch <crush@themanaworld.org>2009-03-05 19:40:40 +0100
commit6f60667b2671104365c7fcfa7866064e04d50156 (patch)
tree2161adc2f40bcc0fc61baf2b92508eda160e1a6f /src/sql/sqlite
parent8abc32b07bd86a45be9863ec9ae8ca1fdb4d3e75 (diff)
parent7ae5cf4b6d17a85a010c1eb3262d340e94f44e77 (diff)
Merge branch 'master' of git@gitorious.org:tmwserv/mainline
Diffstat (limited to 'src/sql/sqlite')
-rw-r--r--src/sql/sqlite/createTables.sql8
-rw-r--r--src/sql/sqlite/updates/update_2_to_3.sql17
2 files changed, 25 insertions, 0 deletions
diff --git a/src/sql/sqlite/createTables.sql b/src/sql/sqlite/createTables.sql
index 68d4ed5..11478d9 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 0000000..f8fdfc9
--- /dev/null
+++ b/src/sql/sqlite/updates/update_2_to_3.sql
@@ -0,0 +1,17 @@
+
+-- add table tmw_transactions to store transactional history
+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';
+