Browse Source

Integrate shadow into install files.

main
fallenPineapple 7 years ago
committed by discomrade
parent
commit
47b3756762
  1. 58
      install.php
  2. 74
      install.sql

58
install.php

@ -1,7 +1,7 @@
<?php
// Installation/upgrade file
define('VERSION', '5.1.5');
// Installation/upgrade file
define('VERSION', '6.0.4');
require 'inc/bootstrap.php';
loadConfig();
@ -668,6 +668,60 @@ if (file_exists($config['has_installed'])) {
KEY `ipstart` (`ip`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
') or error(db_error());
case '6.0.2':
query('CREATE TABLE IF NOT EXISTS ``announcements`` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`creator` int(10) NOT NULL,
`date` int(10) NOT NULL,
`text` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
') or error(db_error());
case '6.0.3':
query('CREATE TABLE IF NOT EXISTS ``shadow_antispam`` (
`board` varchar(58) NOT NULL,
`thread` int(11) DEFAULT NULL,
`hash` char(40) CHARACTER SET ascii COLLATE ascii_bin NOT NULL,
`created` int(11) NOT NULL,
`expires` int(11) DEFAULT NULL,
`passed` smallint(6) NOT NULL,
PRIMARY KEY (`hash`),
KEY `board` (`board`,`thread`),
KEY `expires` (`expires`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
') or error(db_error());
query('CREATE TABLE IF NOT EXISTS ``shadow_cites`` (
`board` varchar(58) NOT NULL,
`post` int(11) NOT NULL,
`target_board` varchar(58) NOT NULL,
`target` int(11) NOT NULL,
KEY `target` (`target_board`,`target`),
KEY `post` (`board`,`post`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
') or error(db_error());
query('CREATE TABLE IF NOT EXISTS ``shadow_deleted`` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`board` varchar(58) NOT NULL,
`post_id` int(10) NOT NULL,
`del_time` int(11) NOT NULL,
`files` text CHARACTER SET ascii NOT NULL,
`cite_ids` text CHARACTER SET armscii8 NOT NULL,
PRIMARY KEY (`id`),
KEY `board` (`board`),
KEY `post_id` (`post_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
') or error(db_error());
query('CREATE TABLE IF NOT EXISTS ``shadow_filehashes`` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`board` varchar(58) NOT NULL,
`thread` int(11) NOT NULL,
`post` int(11) NOT NULL,
`filehash` text CHARACTER SET ascii NOT NULL,
PRIMARY KEY (`id`),
KEY `thread_id` (`thread`),
KEY `post_id` (`post`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
') or error(db_error());
case false:
// TODO: enhance Tinyboard -> vichan upgrade path.
query("CREATE TABLE IF NOT EXISTS ``search_queries`` ( `ip` varchar(39) NOT NULL, `time` int(11) NOT NULL, `query` text NOT NULL) ENGINE=MyISAM DEFAULT CHARSET=utf8;") or error(db_error());

74
install.sql

@ -3,9 +3,9 @@
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jul 30, 2013 at 09:45 PM
-- Server version: 5.6.10
-- PHP Version: 5.3.15
-- Generation Time: Jun 12, 2017 at 03:36 PM
-- Server version: 5.7.18-0ubuntu0.16.04.1
-- PHP Version: 7.0.18-0ubuntu0.16.04.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
@ -412,6 +412,74 @@ CREATE TABLE IF NOT EXISTS `telegrams` (
PRIMARY KEY(`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
-- --------------------------------------------------------
--
-- Table structure for table `shadow_antispam`
--
CREATE TABLE IF NOT EXISTS `shadow_antispam` (
`board` varchar(58) NOT NULL,
`thread` int(11) DEFAULT NULL,
`hash` char(40) CHARACTER SET ascii COLLATE ascii_bin NOT NULL,
`created` int(11) NOT NULL,
`expires` int(11) DEFAULT NULL,
`passed` smallint(6) NOT NULL,
PRIMARY KEY (`hash`),
KEY `board` (`board`,`thread`),
KEY `expires` (`expires`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
-- --------------------------------------------------------
--
-- Table structure for table `shadow_cites`
--
CREATE TABLE IF NOT EXISTS `shadow_cites` (
`board` varchar(58) NOT NULL,
`post` int(11) NOT NULL,
`target_board` varchar(58) NOT NULL,
`target` int(11) NOT NULL,
KEY `target` (`target_board`,`target`),
KEY `post` (`board`,`post`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
-- --------------------------------------------------------
--
-- Table structure for table `shadow_deleted`
--
CREATE TABLE IF NOT EXISTS `shadow_deleted` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`board` varchar(58) NOT NULL,
`post_id` int(10) NOT NULL,
`del_time` int(11) NOT NULL,
`files` text CHARACTER SET ascii NOT NULL,
`cite_ids` text CHARACTER SET armscii8 NOT NULL,
PRIMARY KEY (`id`),
KEY `board` (`board`),
KEY `post_id` (`post_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
-- --------------------------------------------------------
--
-- Table structure for table `shadow_filehashes`
--
CREATE TABLE IF NOT EXISTS `shadow_filehashes` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`board` varchar(58) NOT NULL,
`thread` int(11) NOT NULL,
`post` int(11) NOT NULL,
`filehash` text CHARACTER SET ascii NOT NULL,
PRIMARY KEY (`id`),
KEY `thread_id` (`thread`),
KEY `post_id` (`post`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
/*!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 */;

Loading…
Cancel
Save