rats-search/btsearch.sql
2017-05-16 12:35:25 +03:00

119 lines
4.2 KiB
SQL

-- MySQL dump 10.16 Distrib 10.1.20-MariaDB, for Linux (x86_64)
--
-- Host: localhost Database: localhost
-- ------------------------------------------------------
-- Server version 10.1.20-MariaDB
/*!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 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `files`
--
DROP TABLE IF EXISTS `files`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `files` (
`hash` char(40) DEFAULT NULL,
`path` text,
`size` bigint(20) unsigned DEFAULT NULL,
`fileid` int(10) unsigned NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`fileid`),
KEY `hash` (`hash`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `sphinx_counter`
--
DROP TABLE IF EXISTS `sphinx_counter`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `sphinx_counter` (
`counter_id` int(11) NOT NULL,
`max_doc_id` int(10) unsigned NOT NULL,
PRIMARY KEY (`counter_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `statistic`
--
DROP TABLE IF EXISTS `statistic`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `statistic` (
`size` bigint(20) unsigned DEFAULT NULL,
`files` bigint(20) unsigned DEFAULT NULL,
`torrents` int(10) unsigned DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `torrents`
--
DROP TABLE IF EXISTS `torrents`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `torrents` (
`hash` char(40) NOT NULL,
`name` text,
`size` bigint(20) unsigned DEFAULT NULL,
`files` int(10) unsigned DEFAULT NULL,
`piecelength` int(10) unsigned DEFAULT NULL,
`added` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`ipv4` char(15) DEFAULT NULL,
`port` smallint(5) unsigned DEFAULT NULL,
`contentType` enum('video','audio','pictures','books','application','archive','disc') DEFAULT NULL,
`contentCategory` varchar(32) DEFAULT NULL,
`seeders` int(10) unsigned DEFAULT NULL,
`leechers` int(10) unsigned DEFAULT NULL,
`completed` int(10) unsigned DEFAULT NULL,
`torrentid` int(10) unsigned NOT NULL AUTO_INCREMENT,
`trackersChecked` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`good` int(10) unsigned DEFAULT '0',
`bad` int(10) unsigned DEFAULT '0',
PRIMARY KEY (`hash`),
UNIQUE KEY `torrentid` (`torrentid`),
KEY `added` (`added`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `torrents_actions`
--
DROP TABLE IF EXISTS `torrents_actions`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `torrents_actions` (
`hash` char(40) NOT NULL,
`action` varchar(32) DEFAULT NULL,
`ipv4` char(15) DEFAULT NULL,
KEY `hash` (`hash`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!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 */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2017-01-30 12:10:40