From d19a5db44c8b155ac23e737e6e38bb2f9586c30e Mon Sep 17 00:00:00 2001 From: 8n-tech <8n-tech@users.noreply.github.com> Date: Thu, 14 May 2015 10:54:21 +1000 Subject: [PATCH] #494 Added mising SQL to the install.sql creation file. --- install.sql | 36 ++++++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/install.sql b/install.sql index 7990c0a8..99553822 100644 --- a/install.sql +++ b/install.sql @@ -10,11 +10,6 @@ SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; -/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; -/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; -/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8 */; - -- -------------------------------------------------------- -- @@ -70,6 +65,7 @@ CREATE TABLE IF NOT EXISTS `boards` ( `public_logs` tinyint(1) default 0, `8archive` boolean default false, `sfw` boolean default false, + `posts_total` INT(11) UNSIGNED NOT NULL DEFAULT 0, PRIMARY KEY (`uri`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; @@ -307,7 +303,7 @@ CREATE TABLE IF NOT EXISTS `ban_appeals` ( -- Table structure for table `post_clean` -- -CREATE TABLE `post_clean` ( +CREATE TABLE IF NOT EXISTS `post_clean` ( `clean_id` int(11) unsigned NOT NULL AUTO_INCREMENT, `post_id` int(11) unsigned NOT NULL, `board_id` varchar(58) NOT NULL, @@ -325,7 +321,7 @@ CREATE TABLE `post_clean` ( -- Table structure for table `board_tags` -- -CREATE TABLE `board_tags` ( +CREATE TABLE IF NOT EXISTS `board_tags` ( `id` int(11) NOT NULL AUTO_INCREMENT, `uri` varchar(30) DEFAULT NULL, `tag` varchar(255) DEFAULT NULL, @@ -338,7 +334,7 @@ CREATE TABLE `board_tags` ( -- Table structure for table `tor_cookies` -- -CREATE TABLE `tor_cookies` ( +CREATE TABLE IF NOT EXISTS `tor_cookies` ( `cookie` varchar(255) NOT NULL, `created` datetime NOT NULL, `uses` tinyint(3) unsigned DEFAULT '0', @@ -351,7 +347,7 @@ CREATE TABLE `tor_cookies` ( -- Table structure for table `dnsbl_bypass` -- -CREATE TABLE `dnsbl_bypass` ( +CREATE TABLE IF NOT EXISTS `dnsbl_bypass` ( `ip` varchar(255) NOT NULL, `created` datetime DEFAULT NULL, PRIMARY KEY (`ip`) @@ -363,7 +359,7 @@ CREATE TABLE `dnsbl_bypass` ( -- Table structure for table `filters` -- -CREATE TABLE `filters` ( +CREATE TABLE IF NOT EXISTS `filters` ( `id` int(11) NOT NULL AUTO_INCREMENT, `type` varchar(255) DEFAULT NULL, `reason` text, @@ -378,7 +374,7 @@ CREATE TABLE `filters` ( -- Table structure for table `pages` -- -CREATE TABLE `pages` ( +CREATE TABLE IF NOT EXISTS `pages` ( `id` int(11) NOT NULL AUTO_INCREMENT, `board` varchar(255) DEFAULT NULL, `name` varchar(255) NOT NULL, @@ -389,6 +385,18 @@ CREATE TABLE `pages` ( UNIQUE KEY `u_pages` (`name`,`board`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; -/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; -/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +-- -------------------------------------------------------- + +-- +-- Table structure for `board_stts` +-- + +CREATE TABLE IF NOT EXISTS `board_stats` ( + `stat_uri` VARCHAR(58) NOT NULL, + `stat_hour` INT(11) UNSIGNED NOT NULL, + `post_count` INT(11) UNSIGNED NULL, + `post_id_array` TEXT NULL, + `author_ip_count` INT(11) UNSIGNED NULL, + `author_ip_array` TEXT NULL, + PRIMARY KEY (`stat_uri`, `stat_hour`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8;