summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorPhilip Häusler <msquare@notrademark.de>2012-12-26 14:02:27 +0100
committerPhilip Häusler <msquare@notrademark.de>2012-12-26 14:02:27 +0100
commit0dabaa505e4463498665a1eb6ab95979578beab3 (patch)
treecf2080c39ed5e03f1d27f6d405dc5d0131679c31 /db
parent213b6261c8fe6de5e405243f7e2179bdd3a1a271 (diff)
#28 begin log
Diffstat (limited to 'db')
-rw-r--r--db/update.d/20_LogEntriesTable.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/db/update.d/20_LogEntriesTable.php b/db/update.d/20_LogEntriesTable.php
new file mode 100644
index 00000000..5ea82efc
--- /dev/null
+++ b/db/update.d/20_LogEntriesTable.php
@@ -0,0 +1,19 @@
+<?php
+
+if(sql_num_query("SHOW TABLES LIKE 'LogEntries'") == 0) {
+ sql_query("CREATE TABLE `LogEntries` (
+ `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
+ `timestamp` INT NOT NULL ,
+ `nick` VARCHAR( 23 ) NOT NULL ,
+ `message` TEXT NOT NULL ,
+ INDEX ( `timestamp` )
+ ) ENGINE = InnoDB;");
+ $applied = true;
+}
+
+if(sql_num_query("SHOW TABLES LIKE 'ChangeLog'") == 0) {
+ sql_query("DROP TABLE `ChangeLog`");
+ $applied = true;
+}
+
+?> \ No newline at end of file