Browse Source

add `board` field on ban table

tags/v0.9.3
Savetheinternet 13 years ago
parent
commit
f33848a3ac
2 changed files with 6 additions and 2 deletions
  1. +4
    -1
      install.php
  2. +2
    -1
      install.sql

+ 4
- 1
install.php View File

@@ -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);


+ 2
- 1
install.sql View File

@@ -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;

--


Loading…
Cancel
Save