-- http://www.phpmyadmin.net
--




--
-- Database: `TapockDev`
--

-- --------------------------------------------------------

--
-- Table structure for table `bb_ads`
--

CREATE TABLE IF NOT EXISTS `bb_ads` (
  `ad_id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  `ad_block_ids` tinyint(2) NOT NULL,
  `ad_start_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `ad_active_days` smallint(6) NOT NULL DEFAULT '0',
  `ad_status` tinyint(4) NOT NULL DEFAULT '1',
  `ad_desc` varchar(255) NOT NULL DEFAULT '',
  `ad_html` text NOT NULL,
  PRIMARY KEY (`ad_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=159 ;

-- --------------------------------------------------------

--
-- Table structure for table `bb_attachments`
--

CREATE TABLE IF NOT EXISTS `bb_attachments` (
  `attach_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `post_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `user_id_1` mediumint(8) NOT NULL DEFAULT '0',
  PRIMARY KEY (`attach_id`),
  KEY `post_id` (`post_id`),
  KEY `user_id_1` (`user_id_1`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `bb_attachments_config`
--

CREATE TABLE IF NOT EXISTS `bb_attachments_config` (
  `config_name` varchar(255) NOT NULL DEFAULT '',
  `config_value` varchar(255) NOT NULL DEFAULT '',
  PRIMARY KEY (`config_name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `bb_attachments_desc`
--

CREATE TABLE IF NOT EXISTS `bb_attachments_desc` (
  `attach_id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  `physical_filename` varchar(255) NOT NULL DEFAULT '',
  `real_filename` varchar(255) NOT NULL DEFAULT '',
  `download_count` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `comment` varchar(255) NOT NULL DEFAULT '',
  `extension` varchar(100) NOT NULL DEFAULT '',
  `mimetype` varchar(100) NOT NULL DEFAULT '',
  `filesize` int(20) NOT NULL DEFAULT '0',
  `filetime` int(11) NOT NULL DEFAULT '0',
  `thumbnail` tinyint(1) NOT NULL DEFAULT '0',
  `tracker_status` tinyint(1) NOT NULL DEFAULT '0',
  `thanks` mediumint(8) NOT NULL DEFAULT '0',
  `rating_sum` int(11) NOT NULL DEFAULT '0',
  `rating_count` mediumint(8) NOT NULL DEFAULT '0',
  PRIMARY KEY (`attach_id`),
  KEY `filetime` (`filetime`),
  KEY `filesize` (`filesize`),
  KEY `physical_filename` (`physical_filename`(10))
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=53544 ;

-- --------------------------------------------------------

--
-- Table structure for table `bb_attachments_rating`
--

CREATE TABLE IF NOT EXISTS `bb_attachments_rating` (
  `attach_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `user_id` mediumint(9) NOT NULL DEFAULT '0',
  `thanked` tinyint(1) NOT NULL DEFAULT '0',
  `rating` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`attach_id`,`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `bb_attach_quota`
--

CREATE TABLE IF NOT EXISTS `bb_attach_quota` (
  `user_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `group_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `quota_type` smallint(2) NOT NULL DEFAULT '0',
  `quota_limit_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
  KEY `quota_type` (`quota_type`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `bb_auth_access`
--

CREATE TABLE IF NOT EXISTS `bb_auth_access` (
  `group_id` mediumint(8) NOT NULL DEFAULT '0',
  `forum_id` smallint(5) unsigned NOT NULL DEFAULT '0',
  `forum_perm` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`group_id`,`forum_id`),
  KEY `forum_id` (`forum_id`),
  KEY `forum_id_group_id` (`forum_id`,`group_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `bb_auth_access_snap`
--

CREATE TABLE IF NOT EXISTS `bb_auth_access_snap` (
  `user_id` mediumint(9) NOT NULL DEFAULT '0',
  `forum_id` smallint(6) NOT NULL DEFAULT '0',
  `forum_perm` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`user_id`,`forum_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `bb_banlist`
--

CREATE TABLE IF NOT EXISTS `bb_banlist` (
  `ban_id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  `ban_userid` mediumint(8) NOT NULL DEFAULT '0',
  `ban_ip` varchar(8) NOT NULL DEFAULT '',
  `ban_email` varchar(255) NOT NULL DEFAULT '',
  PRIMARY KEY (`ban_id`),
  KEY `ban_ip_user_id` (`ban_ip`,`ban_userid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=43 ;

-- --------------------------------------------------------

--
-- Table structure for table `bb_bonus`
--

CREATE TABLE IF NOT EXISTS `bb_bonus` (
  `bonus_points` int(10) NOT NULL DEFAULT '0',
  `bonus_name` varchar(24) DEFAULT NULL,
  `bonus_id` int(10) DEFAULT NULL,
  `bonus_add` int(10) NOT NULL DEFAULT '0'
) ENGINE=MyISAM DEFAULT CHARSET=cp1251;

-- --------------------------------------------------------

--
-- Table structure for table `bb_bonus_cheat`
--

CREATE TABLE IF NOT EXISTS `bb_bonus_cheat` (
  `cheat_id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL DEFAULT '0',
  `cheat_time` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`cheat_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=3677 ;

-- --------------------------------------------------------

--
-- Table structure for table `bb_bt_cheat_log`
--

CREATE TABLE IF NOT EXISTS `bb_bt_cheat_log` (
  `cheat_log_id` int(11) NOT NULL AUTO_INCREMENT,
  `cheat_user_id` int(11) NOT NULL DEFAULT '0',
  `cheat_ses_time` int(11) NOT NULL DEFAULT '0',
  `cheat_log_time` int(11) NOT NULL DEFAULT '0',
  `cheat_ip` char(8) NOT NULL DEFAULT '',
  `cheat_uploaded` bigint(20) NOT NULL DEFAULT '0',
  `cheat_mban` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`cheat_log_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=9875657 ;

-- --------------------------------------------------------

--
-- Table structure for table `bb_bt_dlstatus_main`
--

CREATE TABLE IF NOT EXISTS `bb_bt_dlstatus_main` (
  `user_id` mediumint(9) NOT NULL DEFAULT '0',
  `topic_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `user_status` tinyint(1) NOT NULL DEFAULT '0',
  `last_modified_dlstatus` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`user_id`,`topic_id`),
  KEY `topic_id` (`topic_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `bb_bt_dlstatus_mrg`
--

CREATE TABLE IF NOT EXISTS `bb_bt_dlstatus_mrg` (
  `user_id` mediumint(9) NOT NULL DEFAULT '0',
  `topic_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `user_status` tinyint(1) NOT NULL DEFAULT '0',
  `last_modified_dlstatus` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  KEY `user_topic` (`user_id`,`topic_id`),
  KEY `topic_id` (`topic_id`)
) ENGINE=MRG_MyISAM DEFAULT CHARSET=utf8 UNION=(`bb_bt_dlstatus_main`,`bb_bt_dlstatus_new`);

-- --------------------------------------------------------

--
-- Table structure for table `bb_bt_dlstatus_new`
--

CREATE TABLE IF NOT EXISTS `bb_bt_dlstatus_new` (
  `user_id` mediumint(9) NOT NULL DEFAULT '0',
  `topic_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `user_status` tinyint(1) NOT NULL DEFAULT '0',
  `last_modified_dlstatus` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`user_id`,`topic_id`),
  KEY `topic_id` (`topic_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `bb_bt_dlstatus_snap`
--

CREATE TABLE IF NOT EXISTS `bb_bt_dlstatus_snap` (
  `topic_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `dl_status` tinyint(4) NOT NULL DEFAULT '0',
  `users_count` smallint(5) unsigned NOT NULL DEFAULT '0',
  KEY `topic_id` (`topic_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `bb_bt_last_torstat`
--

CREATE TABLE IF NOT EXISTS `bb_bt_last_torstat` (
  `topic_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `user_id` mediumint(9) NOT NULL DEFAULT '0',
  `dl_status` tinyint(1) NOT NULL DEFAULT '0',
  `up_add` bigint(20) unsigned NOT NULL DEFAULT '0',
  `down_add` bigint(20) unsigned NOT NULL DEFAULT '0',
  `release_add` bigint(20) unsigned NOT NULL DEFAULT '0',
  `bonus_add` bigint(20) unsigned NOT NULL DEFAULT '0',
  `speed_up` bigint(20) unsigned NOT NULL DEFAULT '0',
  `speed_down` bigint(20) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`topic_id`,`user_id`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `bb_bt_last_userstat`
--

CREATE TABLE IF NOT EXISTS `bb_bt_last_userstat` (
  `user_id` mediumint(9) NOT NULL DEFAULT '0',
  `up_add` bigint(20) unsigned NOT NULL DEFAULT '0',
  `down_add` bigint(20) unsigned NOT NULL DEFAULT '0',
  `release_add` bigint(20) unsigned NOT NULL DEFAULT '0',
  `bonus_add` bigint(20) unsigned NOT NULL DEFAULT '0',
  `speed_up` bigint(20) unsigned NOT NULL DEFAULT '0',
  `speed_down` bigint(20) unsigned NOT NULL DEFAULT '0',
  `topic_id` mediumint(8) NOT NULL DEFAULT '0',
  PRIMARY KEY (`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `bb_bt_rating`
--

CREATE TABLE IF NOT EXISTS `bb_bt_rating` (
  `attach_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `voter_id` mediumint(8) NOT NULL DEFAULT '0',
  `voter_ip` char(8) CHARACTER SET utf8 NOT NULL DEFAULT '',
  `rating_value` tinyint(2) unsigned NOT NULL DEFAULT '0',
  KEY `attach_id` (`attach_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `bb_bt_torhelp`
--

CREATE TABLE IF NOT EXISTS `bb_bt_torhelp` (
  `user_id` mediumint(9) NOT NULL DEFAULT '0',
  `topic_id_csv` text NOT NULL,
  PRIMARY KEY (`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `bb_bt_torrents`
--

CREATE TABLE IF NOT EXISTS `bb_bt_torrents` (
  `torrent_id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  `info_hash` varbinary(20) NOT NULL DEFAULT '',
  `post_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `poster_id` mediumint(9) NOT NULL DEFAULT '0',
  `topic_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `forum_id` smallint(5) unsigned NOT NULL DEFAULT '0',
  `attach_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `size` bigint(20) unsigned NOT NULL DEFAULT '0',
  `reg_time` int(11) NOT NULL DEFAULT '0',
  `call_seed_time` int(11) NOT NULL DEFAULT '0',
  `complete_count` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `seeder_last_seen` int(11) NOT NULL DEFAULT '0',
  `tor_status` tinyint(4) NOT NULL DEFAULT '0',
  `checked_user_id` mediumint(8) NOT NULL DEFAULT '0',
  `checked_time` int(11) NOT NULL DEFAULT '0',
  `tor_type` tinyint(1) NOT NULL DEFAULT '0',
  `tor_type_time` int(11) NOT NULL DEFAULT '-1',
  `tor_type_user_id` mediumint(8) NOT NULL DEFAULT '0',
  `tor_music` tinyint(1) NOT NULL DEFAULT '0',
  `speed_up` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `speed_down` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `upd_time` int(11) NOT NULL DEFAULT '0',
  `last_seeder_uid` mediumint(9) NOT NULL DEFAULT '0',
  PRIMARY KEY (`torrent_id`),
  UNIQUE KEY `post_id` (`post_id`),
  UNIQUE KEY `topic_id` (`topic_id`),
  UNIQUE KEY `attach_id` (`attach_id`),
  UNIQUE KEY `info_hash` (`info_hash`),
  KEY `reg_time` (`reg_time`),
  KEY `forum_id` (`forum_id`),
  KEY `poster_id` (`poster_id`),
  KEY `upd_time` (`upd_time`),
  KEY `size` (`size`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=52333 ;

--
-- Triggers `bb_bt_torrents`
--
DROP TRIGGER IF EXISTS `change_tor_type`;
DELIMITER //
CREATE TRIGGER `change_tor_type` AFTER UPDATE ON `bb_bt_torrents`
 FOR EACH ROW if new.tor_type != old.tor_type then
    insert into bb_bt_torrents_del (torrent_id,info_hash,is_del,dl_percent)
    select torrent_id,info_hash,0
    ,case new.tor_type when 1 then 0 when 2 then 50 else 100 end
    from bb_bt_torrents t where t.topic_id=new.topic_id
    ON DUPLICATE KEY UPDATE dl_percent=values(dl_percent);
  end if
//
DELIMITER ;
DROP TRIGGER IF EXISTS `update_btu_on_del_torrent`;

-- --------------------------------------------------------

--
-- Table structure for table `bb_bt_torrents_del`
--

CREATE TABLE IF NOT EXISTS `bb_bt_torrents_del` (
  `torrent_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `info_hash` binary(20) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0',
  `is_del` tinyint(4) NOT NULL DEFAULT '1',
  `dl_percent` tinyint(4) NOT NULL DEFAULT '100',
  PRIMARY KEY (`torrent_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `bb_bt_torrent_activity`
--

CREATE TABLE IF NOT EXISTS `bb_bt_torrent_activity` (
  `user_id` int(11) NOT NULL,
  `topic_id` int(11) NOT NULL,
  `torrent_upload` bigint(20) NOT NULL DEFAULT '0',
  `torrent_download` bigint(20) NOT NULL DEFAULT '0',
  `torrent_bonus` bigint(20) NOT NULL DEFAULT '0',
  `torrent_time` int(11) NOT NULL DEFAULT '0',
  `torrent_speed_up` mediumint(8) NOT NULL DEFAULT '0',
  `torrent_speed_down` mediumint(8) NOT NULL DEFAULT '0',
  `torrent_dl_status` int(1) NOT NULL DEFAULT '0',
  `torrent_status` tinyint(1) NOT NULL DEFAULT '0',
  `torrent_time_st` int(11) NOT NULL DEFAULT '0',
  `torrent_all_download` bigint(20) NOT NULL DEFAULT '0',
  `download_time` int(11) NOT NULL DEFAULT '0',
  `torrent_last_tor_active` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`user_id`,`topic_id`),
  KEY `download_time` (`download_time`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `bb_bt_torstat`
--

CREATE TABLE IF NOT EXISTS `bb_bt_torstat` (
  `torrent_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `user_id` mediumint(9) NOT NULL DEFAULT '0',
  `last_modified_torstat` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `completed` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`torrent_id`,`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `bb_bt_tracker`
--

CREATE TABLE IF NOT EXISTS `bb_bt_tracker` (
  `torrent_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `peer_id` varbinary(20) NOT NULL,
  `user_id` mediumint(9) NOT NULL DEFAULT '0',
  `ip` char(8) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '0',
  `port` smallint(5) unsigned NOT NULL DEFAULT '0',
  `seeder` tinyint(1) NOT NULL DEFAULT '0',
  `releaser` tinyint(1) NOT NULL DEFAULT '0',
  `uploaded` bigint(20) unsigned NOT NULL DEFAULT '0',
  `downloaded` bigint(20) unsigned NOT NULL DEFAULT '0',
  `remain` bigint(20) unsigned NOT NULL DEFAULT '0',
  `speed_up` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `speed_down` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `up_add` bigint(20) unsigned NOT NULL DEFAULT '0',
  `down_add` bigint(20) unsigned NOT NULL DEFAULT '0',
  `update_time` int(11) NOT NULL DEFAULT '0',
  `user_vip` tinyint(1) NOT NULL DEFAULT '0',
  `tor_type` tinyint(1) NOT NULL DEFAULT '0',
  `complete_percent` bigint(20) unsigned NOT NULL DEFAULT '0',
  `xbt_error` varchar(200) DEFAULT NULL,
  `ul_gdc` bigint(20) unsigned NOT NULL DEFAULT '0',
  `ul_gdc_c` mediumint(9) unsigned NOT NULL DEFAULT '0',
  `ul_16k_c` mediumint(9) unsigned NOT NULL DEFAULT '0',
  `ul_eq_dl` mediumint(9) unsigned NOT NULL DEFAULT '0',
  `ipv6` char(32) NOT NULL,
  PRIMARY KEY (`user_id`,`torrent_id`,`ip`,`port`),
  KEY `tu` (`torrent_id`,`user_id`),
  KEY `torrent_peer_id` (`torrent_id`,`peer_id`),
  KEY `user_id_seeder` (`user_id`,`seeder`),
  KEY `user_id` (`user_id`),
  KEY `torrent_id` (`torrent_id`)
) ENGINE=MEMORY DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `bb_bt_tracker_snap`
--

CREATE TABLE IF NOT EXISTS `bb_bt_tracker_snap` (
  `torrent_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `seeders` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `leechers` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `speed_up` int(10) unsigned NOT NULL DEFAULT '0',
  `speed_down` int(10) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`torrent_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `bb_bt_user_settings`
--

CREATE TABLE IF NOT EXISTS `bb_bt_user_settings` (
  `search_id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` mediumint(9) NOT NULL DEFAULT '0',
  `tor_search_set` text NOT NULL,
  `is_def` tinyint(1) NOT NULL DEFAULT '0',
  `search_name` varchar(255) CHARACTER SET utf8 NOT NULL,
  PRIMARY KEY (`search_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=721 ;

-- --------------------------------------------------------

--
-- Table structure for table `bb_categories`
--

CREATE TABLE IF NOT EXISTS `bb_categories` (
  `cat_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
  `cat_title` varchar(100) NOT NULL DEFAULT '',
  `cat_order` smallint(5) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`cat_id`),
  KEY `cat_order` (`cat_order`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=21 ;

-- --------------------------------------------------------

--
-- Table structure for table `bb_config`
--

CREATE TABLE IF NOT EXISTS `bb_config` (
  `config_name` varchar(255) NOT NULL DEFAULT '',
  `config_value` text NOT NULL,
  PRIMARY KEY (`config_name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `bb_countries`
--

CREATE TABLE IF NOT EXISTS `bb_countries` (
  `country_id` mediumint(3) NOT NULL AUTO_INCREMENT,
  `country_code` varchar(3) NOT NULL DEFAULT '0',
  `country_code2` varchar(2) NOT NULL,
  `country_code3` varchar(3) NOT NULL,
  PRIMARY KEY (`country_id`),
  KEY `country_code2` (`country_code2`),
  KEY `country_code3` (`country_code3`),
  KEY `country_code` (`country_code`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=245 ;

-- --------------------------------------------------------

--
-- Table structure for table `bb_cron`
--

CREATE TABLE IF NOT EXISTS `bb_cron` (
  `cron_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
  `cron_active` tinyint(4) NOT NULL DEFAULT '1',
  `cron_title` char(120) NOT NULL DEFAULT '',
  `cron_script` char(120) NOT NULL DEFAULT '',
  `schedule` enum('hourly','daily','weekly','monthly','interval') NOT NULL DEFAULT 'daily',
  `run_day` enum('1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28') DEFAULT NULL,
  `run_time` time DEFAULT '04:00:00',
  `run_order` tinyint(4) unsigned NOT NULL,
  `last_run` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `next_run` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `run_interval` time DEFAULT NULL,
  `log_enabled` tinyint(1) NOT NULL DEFAULT '0',
  `log_file` char(120) NOT NULL DEFAULT '',
  `log_sql_queries` tinyint(4) NOT NULL DEFAULT '0',
  `disable_board` tinyint(1) NOT NULL DEFAULT '0',
  `run_counter` bigint(20) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`cron_id`),
  UNIQUE KEY `title` (`cron_title`),
  UNIQUE KEY `script` (`cron_script`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=57 ;

-- --------------------------------------------------------

--
-- Table structure for table `bb_datastore`
--

CREATE TABLE IF NOT EXISTS `bb_datastore` (
  `ds_title` varchar(255) NOT NULL DEFAULT '',
  `ds_data` longtext NOT NULL,
  PRIMARY KEY (`ds_title`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `bb_disallow`
--

CREATE TABLE IF NOT EXISTS `bb_disallow` (
  `disallow_id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  `disallow_username` varchar(25) NOT NULL DEFAULT '',
  PRIMARY KEY (`disallow_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `bb_extensions`
--

CREATE TABLE IF NOT EXISTS `bb_extensions` (
  `ext_id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  `group_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `extension` varchar(100) NOT NULL DEFAULT '',
  `comment` varchar(100) NOT NULL DEFAULT '',
  `check_user` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ext_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=31 ;

-- --------------------------------------------------------

--
-- Table structure for table `bb_extension_groups`
--

CREATE TABLE IF NOT EXISTS `bb_extension_groups` (
  `group_id` mediumint(8) NOT NULL AUTO_INCREMENT,
  `group_name` varchar(20) NOT NULL DEFAULT '',
  `cat_id` tinyint(2) NOT NULL DEFAULT '0',
  `allow_group` tinyint(1) NOT NULL DEFAULT '0',
  `download_mode` tinyint(1) unsigned NOT NULL DEFAULT '1',
  `upload_icon` varchar(100) NOT NULL DEFAULT '',
  `max_filesize` int(20) NOT NULL DEFAULT '0',
  `forum_permissions` text NOT NULL,
  PRIMARY KEY (`group_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=9 ;

-- --------------------------------------------------------

--
-- Table structure for table `bb_fatseed`
--

CREATE TABLE IF NOT EXISTS `bb_fatseed` (
  `forum_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  PRIMARY KEY (`forum_id`,`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `bb_fatseed_spy`
--

CREATE TABLE IF NOT EXISTS `bb_fatseed_spy` (
  `dspy_id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `count` int(11) NOT NULL,
  `razm` bigint(20) NOT NULL,
  `time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`dspy_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=336286 ;

-- --------------------------------------------------------

--
-- Table structure for table `bb_finance`
--

CREATE TABLE IF NOT EXISTS `bb_finance` (
  `finance_id` int(11) NOT NULL AUTO_INCREMENT,
  `finance_time` int(11) NOT NULL DEFAULT '0',
  `finance_plus` float(11,2) NOT NULL DEFAULT '0.00',
  `finance_minus` float(11,2) NOT NULL DEFAULT '0.00',
  `finance_ostatok` float(11,2) NOT NULL DEFAULT '0.00',
  `finance_user` int(11) NOT NULL DEFAULT '0',
  `finance_text` varchar(255) NOT NULL DEFAULT 'НЕТ',
  PRIMARY KEY (`finance_id`),
  KEY `finance_time` (`finance_time`,`finance_plus`,`finance_minus`,`finance_user`)
) ENGINE=MyISAM  DEFAULT CHARSET=cp1251 AUTO_INCREMENT=274 ;

-- --------------------------------------------------------

--
-- Table structure for table `bb_forums`
--

CREATE TABLE IF NOT EXISTS `bb_forums` (
  `forum_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
  `cat_id` smallint(5) unsigned NOT NULL DEFAULT '0',
  `forum_name` varchar(150) NOT NULL DEFAULT '',
  `forum_desc` text NOT NULL,
  `forum_status` tinyint(4) NOT NULL DEFAULT '0',
  `forum_order` smallint(5) unsigned NOT NULL DEFAULT '1',
  `forum_posts` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `forum_topics` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `forum_last_post_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `prune_days` smallint(5) unsigned NOT NULL DEFAULT '0',
  `auth_view` tinyint(2) NOT NULL DEFAULT '0',
  `auth_read` tinyint(2) NOT NULL DEFAULT '0',
  `auth_post` tinyint(2) NOT NULL DEFAULT '0',
  `auth_reply` tinyint(2) NOT NULL DEFAULT '0',
  `auth_edit` tinyint(2) NOT NULL DEFAULT '0',
  `auth_delete` tinyint(2) NOT NULL DEFAULT '0',
  `auth_sticky` tinyint(2) NOT NULL DEFAULT '0',
  `auth_announce` tinyint(2) NOT NULL DEFAULT '0',
  `auth_vote` tinyint(2) NOT NULL DEFAULT '0',
  `auth_pollcreate` tinyint(2) NOT NULL DEFAULT '0',
  `auth_attachments` tinyint(2) NOT NULL DEFAULT '0',
  `auth_download` tinyint(2) NOT NULL DEFAULT '0',
  `allow_reg_tracker` tinyint(1) NOT NULL DEFAULT '0',
  `allow_dl_topic` tinyint(1) NOT NULL DEFAULT '0',
  `self_moderated` tinyint(1) NOT NULL DEFAULT '0',
  `forum_parent` smallint(5) unsigned NOT NULL DEFAULT '0',
  `show_on_index` tinyint(1) NOT NULL DEFAULT '1',
  `forum_display_sort` tinyint(1) NOT NULL DEFAULT '0',
  `forum_display_order` tinyint(1) NOT NULL DEFAULT '0',
  `topic_tpl_id` smallint(6) NOT NULL DEFAULT '0',
  `forum_postcount` tinyint(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`forum_id`),
  KEY `forums_order` (`forum_order`),
  KEY `cat_id` (`cat_id`),
  KEY `forum_last_post_id` (`forum_last_post_id`),
  KEY `forum_parent` (`forum_parent`),
  KEY `show_on_index` (`show_on_index`,`forum_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=807 ;

-- --------------------------------------------------------

--
-- Table structure for table `bb_groups`
--

CREATE TABLE IF NOT EXISTS `bb_groups` (
  `group_id` mediumint(8) NOT NULL AUTO_INCREMENT,
  `group_type` tinyint(4) NOT NULL DEFAULT '1',
  `group_name` varchar(40) NOT NULL DEFAULT '',
  `group_description` varchar(255) NOT NULL DEFAULT '',
  `group_moderator` mediumint(8) NOT NULL DEFAULT '0',
  `group_single_user` tinyint(1) NOT NULL DEFAULT '1',
  `group_rank` smallint(5) NOT NULL DEFAULT '0',
  PRIMARY KEY (`group_id`),
  KEY `group_single_user` (`group_single_user`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=137 ;

-- --------------------------------------------------------

--
-- Table structure for table `bb_invites`
--

CREATE TABLE IF NOT EXISTS `bb_invites` (
  `invite_id` int(8) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` mediumint(8) NOT NULL DEFAULT '0',
  `new_user_id` mediumint(8) NOT NULL DEFAULT '0',
  `invite_code` varchar(32) CHARACTER SET utf8 NOT NULL,
  `active` enum('1','0') DEFAULT '1',
  `generation_date` int(10) NOT NULL DEFAULT '0',
  `activation_date` int(10) NOT NULL DEFAULT '0',
  `invite_vip` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`invite_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=17535 ;

-- --------------------------------------------------------

--
-- Table structure for table `bb_last_releases`
--

CREATE TABLE IF NOT EXISTS `bb_last_releases` (
  `id` int(2) NOT NULL AUTO_INCREMENT,
  `topic_id` mediumint(8) NOT NULL,
  `topic_title` varchar(250) CHARACTER SET cp1251 NOT NULL,
  `image` varchar(250) CHARACTER SET cp1251 NOT NULL,
  `forum_name` varchar(150) CHARACTER SET cp1251 NOT NULL,
  `forum_id` smallint(8) NOT NULL,
  `username` varchar(25) CHARACTER SET cp1251 NOT NULL,
  `user_id` mediumint(8) NOT NULL,
  `reg_time` int(11) NOT NULL,
  `cat_id` mediumint(8) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=151 ;

-- --------------------------------------------------------

--
-- Table structure for table `bb_log`
--

CREATE TABLE IF NOT EXISTS `bb_log` (
  `log_type_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `log_user_id` mediumint(9) NOT NULL DEFAULT '0',
  `log_username` varchar(25) NOT NULL DEFAULT '',
  `log_user_ip` varchar(8) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
  `log_forum_id` smallint(5) unsigned NOT NULL DEFAULT '0',
  `log_forum_id_new` smallint(5) unsigned NOT NULL DEFAULT '0',
  `log_topic_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `log_topic_id_new` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `log_topic_title` varchar(250) NOT NULL DEFAULT '',
  `log_topic_title_new` varchar(250) NOT NULL DEFAULT '',
  `log_time` int(11) NOT NULL DEFAULT '0',
  `log_msg` text NOT NULL,
  KEY `log_time` (`log_time`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `bb_posts`
--

CREATE TABLE IF NOT EXISTS `bb_posts` (
  `post_id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  `topic_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `forum_id` smallint(5) unsigned NOT NULL DEFAULT '0',
  `poster_id` mediumint(8) NOT NULL DEFAULT '0',
  `post_time` int(11) NOT NULL DEFAULT '0',
  `poster_ip` char(8) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
  `post_username` varchar(25) NOT NULL DEFAULT '',
  `enable_bbcode` tinyint(1) NOT NULL DEFAULT '1',
  `enable_smilies` tinyint(1) NOT NULL DEFAULT '1',
  `enable_sig` tinyint(1) NOT NULL DEFAULT '1',
  `post_edit_time` int(11) NOT NULL DEFAULT '0',
  `post_edit_count` smallint(5) unsigned NOT NULL DEFAULT '0',
  `post_attachment` tinyint(1) NOT NULL DEFAULT '0',
  `post_reported` tinyint(1) NOT NULL DEFAULT '0',
  `posts_count` tinyint(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`post_id`),
  KEY `poster_id` (`poster_id`),
  KEY `forum_id_post_time` (`forum_id`,`post_time`),
  KEY `topic_id` (`topic_id`),
  KEY `tpp` (`topic_id`,`post_id`,`post_time`),
  KEY `pt_pi` (`post_time`,`post_id`),
  KEY `post_time` (`post_time`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1072497 ;

-- --------------------------------------------------------

--
-- Table structure for table `bb_posts_html`
--

CREATE TABLE IF NOT EXISTS `bb_posts_html` (
  `post_id` mediumint(9) NOT NULL DEFAULT '0',
  `post_html_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `post_html` mediumtext NOT NULL,
  PRIMARY KEY (`post_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `bb_posts_rating`
--

CREATE TABLE IF NOT EXISTS `bb_posts_rating` (
  `post_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `rating` smallint(1) NOT NULL,
  `rate_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`post_id`,`user_id`),
  KEY `post_id` (`post_id`),
  KEY `user_id` (`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `bb_posts_search`
--

CREATE TABLE IF NOT EXISTS `bb_posts_search` (
  `post_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `search_words` text NOT NULL,
  PRIMARY KEY (`post_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `bb_posts_text`
--

CREATE TABLE IF NOT EXISTS `bb_posts_text` (
  `post_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `bbcode_uid` varchar(10) NOT NULL DEFAULT '',
  `post_text` mediumtext NOT NULL,
  `post_text_orig` mediumtext NOT NULL,
  PRIMARY KEY (`post_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `bb_privmsgs`
--

CREATE TABLE IF NOT EXISTS `bb_privmsgs` (
  `privmsgs_id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  `privmsgs_type` tinyint(4) NOT NULL DEFAULT '0',
  `privmsgs_subject` varchar(255) NOT NULL DEFAULT '0',
  `privmsgs_from_userid` mediumint(8) NOT NULL DEFAULT '0',
  `privmsgs_to_userid` mediumint(8) NOT NULL DEFAULT '0',
  `privmsgs_date` int(11) NOT NULL DEFAULT '0',
  `privmsgs_ip` varchar(8) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
  `privmsgs_enable_bbcode` tinyint(1) NOT NULL DEFAULT '1',
  `privmsgs_enable_smilies` tinyint(1) NOT NULL DEFAULT '1',
  `privmsgs_reported` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`privmsgs_id`),
  KEY `privmsgs_from_userid` (`privmsgs_from_userid`),
  KEY `tfu` (`privmsgs_type`,`privmsgs_from_userid`),
  KEY `ud` (`privmsgs_to_userid`,`privmsgs_date`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=3130474 ;

-- --------------------------------------------------------

--
-- Table structure for table `bb_privmsgs_text`
--

CREATE TABLE IF NOT EXISTS `bb_privmsgs_text` (
  `privmsgs_text_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `privmsgs_bbcode_uid` varchar(10) NOT NULL DEFAULT '0',
  `privmsgs_text` text NOT NULL,
  PRIMARY KEY (`privmsgs_text_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `bb_profile_page`
--

CREATE TABLE IF NOT EXISTS `bb_profile_page` (
  `page` varchar(64) NOT NULL DEFAULT '',
  `user_level` tinyint(4) NOT NULL DEFAULT '0',
  `stat_hits` bigint(20) NOT NULL DEFAULT '0',
  `stat_time` decimal(20,3) NOT NULL DEFAULT '0.000',
  `stat_sql` bigint(20) NOT NULL DEFAULT '0',
  `stat_sql_time` decimal(20,3) NOT NULL DEFAULT '0.000',
  `stat_start` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`page`,`user_level`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `bb_profile_view`
--

CREATE TABLE IF NOT EXISTS `bb_profile_view` (
  `user_id` mediumint(8) NOT NULL DEFAULT '0',
  `view_user_id` mediumint(8) NOT NULL DEFAULT '0',
  `view_date` int(11) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`user_id`,`view_user_id`),
  KEY `view_date` (`view_date`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `bb_quota_limits`
--

CREATE TABLE IF NOT EXISTS `bb_quota_limits` (
  `quota_limit_id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  `quota_desc` varchar(20) NOT NULL DEFAULT '',
  `quota_limit` bigint(20) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`quota_limit_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=5 ;

-- --------------------------------------------------------

--
-- Table structure for table `bb_ranks`
--

CREATE TABLE IF NOT EXISTS `bb_ranks` (
  `rank_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
  `rank_title` varchar(50) NOT NULL DEFAULT '',
  `rank_min` mediumint(8) NOT NULL DEFAULT '0',
  `rank_special` tinyint(1) NOT NULL DEFAULT '1',
  `rank_image` varchar(255) NOT NULL DEFAULT '',
  `rank_href` varchar(255) NOT NULL,
  PRIMARY KEY (`rank_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=42 ;

-- --------------------------------------------------------

--
-- Table structure for table `bb_reports`
--

CREATE TABLE IF NOT EXISTS `bb_reports` (
  `report_id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` mediumint(8) NOT NULL,
  `report_time` int(11) NOT NULL,
  `report_last_change` mediumint(8) unsigned DEFAULT NULL,
  `report_module_id` mediumint(8) unsigned NOT NULL,
  `report_status` tinyint(1) NOT NULL,
  `report_reason_id` mediumint(8) unsigned NOT NULL,
  `report_subject` int(11) NOT NULL,
  `report_subject_data` mediumtext,
  `report_title` varchar(255) NOT NULL,
  `report_desc` text NOT NULL,
  PRIMARY KEY (`report_id`),
  KEY `user_id` (`user_id`),
  KEY `report_time` (`report_time`),
  KEY `report_type_id` (`report_module_id`),
  KEY `report_status` (`report_status`),
  KEY `report_reason_id` (`report_reason_id`),
  KEY `report_subject` (`report_subject`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=280 ;

-- --------------------------------------------------------

--
-- Table structure for table `bb_reports_changes`
--

CREATE TABLE IF NOT EXISTS `bb_reports_changes` (
  `report_change_id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  `report_id` mediumint(8) unsigned NOT NULL,
  `user_id` mediumint(8) NOT NULL,
  `report_change_time` int(11) NOT NULL,
  `report_status` tinyint(1) NOT NULL,
  `report_change_comment` text NOT NULL,
  PRIMARY KEY (`report_change_id`),
  KEY `report_id` (`report_id`),
  KEY `user_id` (`user_id`),
  KEY `report_change_time` (`report_change_time`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=141 ;

-- --------------------------------------------------------

--
-- Table structure for table `bb_reports_modules`
--

CREATE TABLE IF NOT EXISTS `bb_reports_modules` (
  `report_module_id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  `report_module_order` mediumint(8) unsigned NOT NULL,
  `report_module_notify` tinyint(1) NOT NULL,
  `report_module_prune` smallint(6) NOT NULL,
  `report_module_last_prune` int(11) DEFAULT NULL,
  `report_module_name` varchar(50) NOT NULL,
  `auth_write` tinyint(1) NOT NULL,
  `auth_view` tinyint(1) NOT NULL,
  `auth_notify` tinyint(1) NOT NULL,
  `auth_delete` tinyint(1) NOT NULL,
  PRIMARY KEY (`report_module_id`),
  KEY `report_module_order` (`report_module_order`),
  KEY `auth_view` (`auth_view`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=6 ;

-- --------------------------------------------------------

--
-- Table structure for table `bb_reports_reasons`
--

CREATE TABLE IF NOT EXISTS `bb_reports_reasons` (
  `report_reason_id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  `report_module_id` mediumint(8) unsigned NOT NULL,
  `report_reason_order` mediumint(8) unsigned NOT NULL,
  `report_reason_desc` varchar(255) NOT NULL,
  PRIMARY KEY (`report_reason_id`),
  KEY `report_type_id` (`report_module_id`),
  KEY `report_reason_order` (`report_reason_order`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `bb_smilies`
--

CREATE TABLE IF NOT EXISTS `bb_smilies` (
  `smilies_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
  `code` varchar(50) NOT NULL DEFAULT '',
  `smile_url` varchar(100) NOT NULL DEFAULT '',
  `emoticon` varchar(75) NOT NULL DEFAULT '',
  `type` tinyint(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`smilies_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1169 ;

-- --------------------------------------------------------

--
-- Table structure for table `bb_socialka`
--

CREATE TABLE IF NOT EXISTS `bb_socialka` (
  `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `sel_user_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `type` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `date` int(11) unsigned NOT NULL DEFAULT '0',
  `allow_pm` tinyint(1) NOT NULL DEFAULT '1',
  `allow_post` tinyint(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`),
  UNIQUE KEY `user_id` (`user_id`,`sel_user_id`),
  KEY `user_type_date` (`user_id`,`type`,`date`),
  KEY `user_sel_type` (`user_id`,`sel_user_id`,`type`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=2842 ;

-- --------------------------------------------------------

--
-- Table structure for table `bb_status_update`
--

CREATE TABLE IF NOT EXISTS `bb_status_update` (
  `name` varchar(124) NOT NULL,
  `value` bigint(22) NOT NULL DEFAULT '0',
  PRIMARY KEY (`name`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `bb_topics`
--

CREATE TABLE IF NOT EXISTS `bb_topics` (
  `topic_id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  `forum_id` smallint(8) unsigned NOT NULL DEFAULT '0',
  `topic_title` varchar(250) NOT NULL DEFAULT '',
  `topic_title_orig` varchar(250) NOT NULL DEFAULT '',
  `topic_poster` mediumint(8) NOT NULL DEFAULT '0',
  `topic_time` int(11) NOT NULL DEFAULT '0',
  `topic_views` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `topic_replies` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `topic_status` tinyint(3) NOT NULL DEFAULT '0',
  `topic_vote` tinyint(1) NOT NULL DEFAULT '0',
  `topic_type` tinyint(3) NOT NULL DEFAULT '0',
  `topic_first_post_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `topic_last_post_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `topic_moved_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `topic_attachment` tinyint(1) NOT NULL DEFAULT '0',
  `topic_reported` tinyint(1) NOT NULL DEFAULT '0',
  `topic_dl_type` tinyint(1) NOT NULL DEFAULT '0',
  `topic_last_post_time` int(11) NOT NULL DEFAULT '0',
  `topic_img` varchar(255) NOT NULL,
  PRIMARY KEY (`topic_id`),
  KEY `forum_id` (`forum_id`),
  KEY `topic_last_post_id` (`topic_last_post_id`),
  KEY `topic_last_post_time` (`topic_last_post_time`,`topic_id`),
  KEY `ftlpt` (`forum_id`,`topic_type`,`topic_last_post_time`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=72856 ;

-- --------------------------------------------------------

--
-- Table structure for table `bb_topics_watch`
--

CREATE TABLE IF NOT EXISTS `bb_topics_watch` (
  `topic_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `user_id` mediumint(8) NOT NULL DEFAULT '0',
  `notify_status` tinyint(1) NOT NULL DEFAULT '0',
  KEY `topic_id` (`topic_id`),
  KEY `user_id` (`user_id`),
  KEY `notify_status` (`notify_status`),
  KEY `tu` (`topic_id`,`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `bb_topics_wdel`
--

CREATE TABLE IF NOT EXISTS `bb_topics_wdel` (
  `topic_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `user_id` mediumint(8) NOT NULL DEFAULT '0',
  `topic_del` tinyint(1) NOT NULL DEFAULT '0',
  KEY `topic_id` (`topic_id`,`user_id`),
  KEY `topic_del` (`topic_del`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `bb_topics_wpod`
--

CREATE TABLE IF NOT EXISTS `bb_topics_wpod` (
  `topic_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `user_id` mediumint(8) NOT NULL DEFAULT '0',
  `topic_pod` tinyint(1) NOT NULL DEFAULT '0',
  KEY `topic_id` (`topic_id`,`user_id`),
  KEY `topic_pod` (`topic_id`,`user_id`,`topic_pod`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `bb_topic_templates`
--

CREATE TABLE IF NOT EXISTS `bb_topic_templates` (
  `tpl_id` smallint(6) NOT NULL AUTO_INCREMENT,
  `tpl_name` varchar(20) NOT NULL DEFAULT '',
  `tpl_script` varchar(30) NOT NULL DEFAULT '',
  `tpl_template` varchar(30) NOT NULL DEFAULT '',
  `tpl_desc` varchar(255) NOT NULL DEFAULT '',
  PRIMARY KEY (`tpl_id`),
  UNIQUE KEY `tpl_name` (`tpl_name`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=66 ;

-- --------------------------------------------------------

--
-- Table structure for table `bb_toptracker_votes`
--

CREATE TABLE IF NOT EXISTS `bb_toptracker_votes` (
  `user_id` int(11) NOT NULL,
  `vote_time` int(11) NOT NULL,
  PRIMARY KEY (`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `bb_untrusted_ips`
--

CREATE TABLE IF NOT EXISTS `bb_untrusted_ips` (
  `untrusted_ip` char(8) NOT NULL,
  `untrusted_reason` enum('bruteforce') NOT NULL,
  `untrusted_attempts` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `untrusted_pending` tinyint(1) unsigned NOT NULL DEFAULT '0',
  UNIQUE KEY `untrusted_ip` (`untrusted_ip`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `bb_users_cook`
--

CREATE TABLE IF NOT EXISTS `bb_users_cook` (
  `user_id` int(11) NOT NULL,
  `user_cook` varchar(32) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
  `user_cook_time` int(11) NOT NULL,
  `all_ban` tinyint(1) NOT NULL DEFAULT '0',
  `green` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`user_id`,`user_cook`),
  KEY `user_cook` (`user_cook`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `bb_users_ips`
--

CREATE TABLE IF NOT EXISTS `bb_users_ips` (
  `user_id` int(11) NOT NULL,
  `user_ip` char(8) CHARACTER SET utf8 NOT NULL,
  `user_ip_time` int(11) NOT NULL,
  PRIMARY KEY (`user_id`,`user_ip`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `bb_users_warn`
--

CREATE TABLE IF NOT EXISTS `bb_users_warn` (
  `warn_id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `warn_vidal` int(11) NOT NULL,
  `warn_type` tinyint(2) NOT NULL,
  `warn_theme` varchar(255) CHARACTER SET utf8 NOT NULL,
  `warn_bbcode_uid` varchar(10) NOT NULL,
  `warn_text` text CHARACTER SET utf8,
  `warn_exp_time` int(11) NOT NULL DEFAULT '0',
  `warn_time` int(11) NOT NULL DEFAULT '0',
  `warn_activ` tinyint(1) NOT NULL DEFAULT '1',
  `warn_post` int(15) NOT NULL DEFAULT '0',
  PRIMARY KEY (`warn_id`),
  KEY `warn_post` (`warn_post`),
  KEY `uw` (`user_id`,`warn_activ`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=21591 ;

-- --------------------------------------------------------

--
-- Table structure for table `bb_user_group`
--

CREATE TABLE IF NOT EXISTS `bb_user_group` (
  `group_id` mediumint(8) NOT NULL DEFAULT '0',
  `user_id` mediumint(8) NOT NULL DEFAULT '0',
  `user_pending` tinyint(1) NOT NULL DEFAULT '0',
  `in_time` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`group_id`,`user_id`),
  KEY `user_id` (`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `bb_user_notice`
--

CREATE TABLE IF NOT EXISTS `bb_user_notice` (
  `notice_id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` mediumint(8) NOT NULL DEFAULT '0',
  `user_mess_id` mediumint(8) NOT NULL DEFAULT '0',
  `notice_theme` varchar(255) NOT NULL DEFAULT '',
  `notice_bbcode_uid` varchar(10) NOT NULL DEFAULT '',
  `notice_text` text NOT NULL,
  `notice_settime` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`notice_id`),
  KEY `user_id` (`user_id`),
  KEY `user_mess_id` (`user_mess_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=65 ;

-- --------------------------------------------------------

--
-- Table structure for table `bb_vote_desc`
--

CREATE TABLE IF NOT EXISTS `bb_vote_desc` (
  `vote_id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  `topic_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `vote_text` text NOT NULL,
  `vote_start` int(11) NOT NULL DEFAULT '0',
  `vote_length` int(11) NOT NULL DEFAULT '0',
  `vote_text_orig` text NOT NULL,
  PRIMARY KEY (`vote_id`),
  KEY `topic_id` (`topic_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=653 ;

-- --------------------------------------------------------

--
-- Table structure for table `bb_vote_results`
--

CREATE TABLE IF NOT EXISTS `bb_vote_results` (
  `vote_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `vote_option_id` tinyint(4) unsigned NOT NULL DEFAULT '0',
  `vote_option_text` varchar(255) NOT NULL DEFAULT '',
  `vote_result` int(11) NOT NULL DEFAULT '0',
  `vote_option_text_orig` varchar(255) NOT NULL DEFAULT '',
  KEY `vote_option_id` (`vote_option_id`),
  KEY `vote_id` (`vote_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `bb_vote_voters`
--

CREATE TABLE IF NOT EXISTS `bb_vote_voters` (
  `vote_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `vote_user_id` mediumint(8) NOT NULL DEFAULT '0',
  `vote_user_ip` char(8) NOT NULL DEFAULT '',
  KEY `vote_id` (`vote_id`),
  KEY `vote_user_id` (`vote_user_id`),
  KEY `vote_user_ip` (`vote_user_ip`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `bb_warnings`
--

CREATE TABLE IF NOT EXISTS `bb_warnings` (
  `warning_id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  `warning_type` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `warning_post_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `warning_user_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `warning_poster_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `warning_posted` int(11) NOT NULL DEFAULT '0',
  `warning_expires` int(11) NOT NULL DEFAULT '0',
  `warning_proceed` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`warning_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `bb_warnings_text`
--

CREATE TABLE IF NOT EXISTS `bb_warnings_text` (
  `warning_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `bbcode_uid` varchar(10) NOT NULL DEFAULT '',
  `warning_text` text,
  PRIMARY KEY (`warning_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `bb_words`
--

CREATE TABLE IF NOT EXISTS `bb_words` (
  `word_id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  `word` char(100) NOT NULL DEFAULT '',
  `replacement` char(100) NOT NULL DEFAULT '',
  PRIMARY KEY (`word_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=59 ;

-- --------------------------------------------------------

--
-- Table structure for table `bd_kino`
--

CREATE TABLE IF NOT EXISTS `bd_kino` (
  `kino_id` int(11) NOT NULL AUTO_INCREMENT,
  `kino_name` varchar(255) NOT NULL,
  `seria_id` int(11) NOT NULL,
  PRIMARY KEY (`kino_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=cp1251 AUTO_INCREMENT=5057 ;

-- --------------------------------------------------------

--
-- Table structure for table `bd_kino_seria`
--

CREATE TABLE IF NOT EXISTS `bd_kino_seria` (
  `seria_id` int(11) NOT NULL AUTO_INCREMENT,
  `seria_name` varchar(255) NOT NULL,
  PRIMARY KEY (`seria_id`)
) ENGINE=MyISAM DEFAULT CHARSET=cp1251 AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `bd_kino_tor`
--

CREATE TABLE IF NOT EXISTS `bd_kino_tor` (
  `atach_id` int(11) NOT NULL,
  `forum_id` int(11) NOT NULL,
  `kino_id` int(11) NOT NULL,
  PRIMARY KEY (`atach_id`),
  KEY `kino_id` (`kino_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `bd_names`
--

CREATE TABLE IF NOT EXISTS `bd_names` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `forum_id` smallint(5) NOT NULL,
  `name` varchar(255) NOT NULL,
  `atach_id` int(11) NOT NULL,
  `kino_id` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=cp1251 AUTO_INCREMENT=8302 ;

-- --------------------------------------------------------

--
-- Table structure for table `buf_last_seeder`
--

CREATE TABLE IF NOT EXISTS `buf_last_seeder` (
  `torrent_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `seeder_last_seen` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`torrent_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `buf_topic_view`
--

CREATE TABLE IF NOT EXISTS `buf_topic_view` (
  `topic_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `topic_views` mediumint(8) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`topic_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `my_retrackers`
--

CREATE TABLE IF NOT EXISTS `my_retrackers` (
  `id_retracker` int(11) NOT NULL AUTO_INCREMENT,
  `retracker_name` varchar(50) CHARACTER SET cp1251 NOT NULL,
  `retracker_url` varchar(300) CHARACTER SET cp1251 NOT NULL,
  PRIMARY KEY (`id_retracker`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=57 ;

-- --------------------------------------------------------

--
-- Table structure for table `my_retracker_addrs`
--

CREATE TABLE IF NOT EXISTS `my_retracker_addrs` (
  `id_retracker_addr` int(11) NOT NULL AUTO_INCREMENT,
  `id_retracker` int(11) NOT NULL,
  `ip_beg` bigint(20) NOT NULL,
  `ip_end` bigint(20) NOT NULL,
  PRIMARY KEY (`id_retracker_addr`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1368 ;

-- --------------------------------------------------------

--
-- Table structure for table `new_dlstatus_snap2`
--

CREATE TABLE IF NOT EXISTS `new_dlstatus_snap2` (
  `topic_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `dl_status` tinyint(4) NOT NULL DEFAULT '0',
  `users_count` smallint(5) unsigned NOT NULL DEFAULT '0',
  KEY `topic_id` (`topic_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `sph_counter`
--

CREATE TABLE IF NOT EXISTS `sph_counter` (
  `counter_id` int(11) NOT NULL,
  `max_doc_id` int(11) NOT NULL,
  PRIMARY KEY (`counter_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `tort`
--

CREATE TABLE IF NOT EXISTS `tort` (
  `torrent_id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  `info_hash` varchar(40) NOT NULL,
  `post_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `poster_id` mediumint(9) NOT NULL DEFAULT '0',
  `topic_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `forum_id` smallint(5) unsigned NOT NULL DEFAULT '0',
  `attach_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `size` bigint(20) unsigned NOT NULL DEFAULT '0',
  `reg_time` int(11) NOT NULL DEFAULT '0',
  `call_seed_time` int(11) NOT NULL DEFAULT '0',
  `complete_count` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `seeder_last_seen` int(11) NOT NULL DEFAULT '0',
  `tor_status` tinyint(4) NOT NULL DEFAULT '0',
  `checked_user_id` mediumint(8) NOT NULL DEFAULT '0',
  `checked_time` int(11) NOT NULL DEFAULT '0',
  `tor_type` tinyint(1) NOT NULL DEFAULT '0',
  `tor_type_time` int(11) NOT NULL DEFAULT '-1',
  `tor_music` tinyint(1) NOT NULL DEFAULT '0',
  `speed_up` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `speed_down` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `upd_time` int(11) NOT NULL DEFAULT '0',
  `last_seeder_uid` mediumint(9) NOT NULL DEFAULT '0',
  PRIMARY KEY (`torrent_id`),
  UNIQUE KEY `post_id` (`post_id`),
  UNIQUE KEY `topic_id` (`topic_id`),
  UNIQUE KEY `attach_id` (`attach_id`),
  KEY `reg_time` (`reg_time`),
  KEY `forum_id` (`forum_id`),
  KEY `poster_id` (`poster_id`),
  KEY `upd_time` (`upd_time`),
  KEY `size` (`size`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=23 ;

-- --------------------------------------------------------

--
-- Table structure for table `xbt_announce_log`
--

CREATE TABLE IF NOT EXISTS `xbt_announce_log` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `ipa` int(10) unsigned NOT NULL DEFAULT '0',
  `port` int(11) NOT NULL DEFAULT '0',
  `event` int(11) NOT NULL DEFAULT '0',
  `info_hash` blob NOT NULL,
  `peer_id` blob NOT NULL,
  `downloaded` bigint(20) NOT NULL DEFAULT '0',
  `left0` bigint(20) NOT NULL DEFAULT '0',
  `uploaded` bigint(20) NOT NULL DEFAULT '0',
  `uid` int(11) NOT NULL DEFAULT '0',
  `mtime` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `xbt_config`
--

CREATE TABLE IF NOT EXISTS `xbt_config` (
  `name` varchar(255) NOT NULL DEFAULT '',
  `value` varchar(255) NOT NULL DEFAULT '',
  PRIMARY KEY (`name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `xbt_deny_from_hosts`
--

CREATE TABLE IF NOT EXISTS `xbt_deny_from_hosts` (
  `begin` int(11) NOT NULL DEFAULT '0',
  `end` int(11) NOT NULL DEFAULT '0'
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `xbt_files_users`
--

CREATE TABLE IF NOT EXISTS `xbt_files_users` (
  `fid` int(11) NOT NULL DEFAULT '0',
  `uid` int(11) NOT NULL DEFAULT '0',
  `active` tinyint(4) NOT NULL DEFAULT '0',
  `announced` int(11) NOT NULL DEFAULT '0',
  `completed` int(11) NOT NULL DEFAULT '0',
  `downloaded` bigint(20) NOT NULL DEFAULT '0',
  `left` bigint(20) NOT NULL DEFAULT '0',
  `uploaded` bigint(20) NOT NULL DEFAULT '0',
  `mtime` int(11) NOT NULL DEFAULT '0',
  UNIQUE KEY `fid` (`fid`,`uid`),
  KEY `uid` (`uid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `xbt_scrape_log`
--

CREATE TABLE IF NOT EXISTS `xbt_scrape_log` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `ipa` int(11) NOT NULL DEFAULT '0',
  `info_hash` blob,
  `uid` int(11) NOT NULL DEFAULT '0',
  `mtime` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

