diff options
author | Philip Häusler <msquare@notrademark.de> | 2012-12-27 03:04:54 +0100 |
---|---|---|
committer | Philip Häusler <msquare@notrademark.de> | 2012-12-27 03:04:54 +0100 |
commit | caeadadb2734bfc537d3e1701b2a20cad233a07e (patch) | |
tree | e0606c6eb37707b372e65cf1c5f6243254eb94fe /db | |
parent | 32cae74a585ecc074124aa5b9668b9f0a25a2ad5 (diff) | |
parent | 0f0f847af4c9ffe8138c802086bda7eb15f9baef (diff) |
Merge branch 'dev'
Diffstat (limited to 'db')
-rw-r--r-- | db/update.d/20_LogEntriesTable.php | 19 | ||||
-rw-r--r-- | db/update.d/21_Atom.php | 4 |
2 files changed, 23 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 diff --git a/db/update.d/21_Atom.php b/db/update.d/21_Atom.php new file mode 100644 index 00000000..f592e0e6 --- /dev/null +++ b/db/update.d/21_Atom.php @@ -0,0 +1,4 @@ +<?php +mysql_query("INSERT IGNORE INTO `Privileges` (`name`, `desc`) VALUES ('atom', ' Atom news export')"); +$applied = mysql_affected_rows() > 0; +?> |