summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSavetheinternet <savetheinternet@tinyboard.org>2011-07-27 13:02:49 +1000
committerSavetheinternet <savetheinternet@tinyboard.org>2011-07-27 13:02:49 +1000
commitf33848a3acb010cfd21b7087f92293038c9f6d4f (patch)
tree0928c11c86d54b96c50c1f0d06e31aa22719c20e
parentada976e47e574a39f0384151a87d0766b25718c4 (diff)
add `board` field on ban table
-rw-r--r--install.php5
-rw-r--r--install.sql3
2 files changed, 6 insertions, 2 deletions
diff --git a/install.php b/install.php
index cbb1f3f6..5c452600 100644
--- a/install.php
+++ b/install.php
@@ -1,6 +1,6 @@
<?php
// Installation/upgrade file
- define('VERSION', 'v0.9.3-dev-3');
+ define('VERSION', 'v0.9.3-dev-4');
require 'inc/functions.php';
require 'inc/display.php';
@@ -81,6 +81,9 @@
foreach($boards as &$_board) {
query(sprintf("ALTER TABLE `posts_%s` CHANGE `filehash` `filehash` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL", $_board['uri'])) or error(db_error());
}
+ case 'v0.9.3-dev-3':
+ // Board-specifc bans
+ query("ALTER TABLE `bans` ADD `board` SMALLINT NULL AFTER `reason`") or error(db_error());
case false:
// Update version number
file_write($config['has_installed'], VERSION);
diff --git a/install.sql b/install.sql
index dac2e2f5..dfdb62f0 100644
--- a/install.sql
+++ b/install.sql
@@ -23,7 +23,8 @@ CREATE TABLE IF NOT EXISTS `bans` (
`mod` int(11) NOT NULL COMMENT 'which mod made the ban',
`set` int(11) NOT NULL,
`expires` int(11) DEFAULT NULL,
- `reason` text
+ `reason` text,
+ `board` smallint(6) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--