summaryrefslogtreecommitdiff
path: root/db/update.d/20_LogEntriesTable.php
blob: 5ea82efcce5a27acaec10b1bd3c99c52aea3983f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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;
}

?>