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

--
-- Table structure for table `fs_archives`
--

CREATE TABLE IF NOT EXISTS `fs_archives` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `comic_id` int(11) NOT NULL,
  `volume_id` int(11) NOT NULL,
  `chapter_id` int(11) NOT NULL,
  `filename` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  `size` int(11) NOT NULL,
  `created` datetime NOT NULL,
  `updated` datetime NOT NULL,
  `lastdownload` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `size` (`size`),
  KEY `chapter_id` (`chapter_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `fs_chapters`
--

CREATE TABLE IF NOT EXISTS `fs_chapters` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `comic_id` int(11) NOT NULL,
  `team_id` int(11) NOT NULL,
  `joint_id` int(11) NOT NULL,
  `chapter` int(11) NOT NULL,
  `subchapter` int(11) NOT NULL,
  `volume` int(11) NOT NULL,
  `language` varchar(16) COLLATE utf8_unicode_ci NOT NULL,
  `name` varchar(256) COLLATE utf8_unicode_ci NOT NULL,
  `stub` varchar(256) COLLATE utf8_unicode_ci NOT NULL,
  `uniqid` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  `hidden` int(11) NOT NULL,
  `description` varchar(512) COLLATE utf8_unicode_ci NOT NULL,
  `thumbnail` varchar(512) COLLATE utf8_unicode_ci NOT NULL,
  `created` datetime NOT NULL,
  `lastseen` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `updated` datetime NOT NULL,
  `creator` int(11) NOT NULL,
  `editor` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `created` (`created`),
  KEY `comic_id` (`comic_id`),
  KEY `team_id` (`team_id`),
  KEY `joint_id` (`joint_id`),
  KEY `chapter` (`chapter`),
  KEY `subchapter` (`subchapter`),
  KEY `volume` (`volume`),
  KEY `language` (`language`),
  KEY `stub` (`stub`),
  KEY `uniqid` (`uniqid`),
  KEY `updated` (`updated`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `fs_comics`
--

CREATE TABLE IF NOT EXISTS `fs_comics` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(256) COLLATE utf8_unicode_ci NOT NULL,
  `stub` varchar(256) COLLATE utf8_unicode_ci NOT NULL,
  `uniqid` varchar(256) COLLATE utf8_unicode_ci NOT NULL,
  `hidden` int(11) NOT NULL,
  `author` varchar(512) COLLATE utf8_unicode_ci NOT NULL,
  `artist` varchar(512) COLLATE utf8_unicode_ci NOT NULL,
  `description` text COLLATE utf8_unicode_ci NOT NULL,
  `thumbnail` varchar(512) COLLATE utf8_unicode_ci NOT NULL,
  `customchapter` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `format` tinyint(1) NOT NULL,
  `adult` tinyint(2) NOT NULL,
  `created` datetime NOT NULL,
  `lastseen` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `updated` datetime NOT NULL,
  `creator` int(11) NOT NULL,
  `editor` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `stub` (`stub`),
  KEY `uniqid` (`uniqid`),
  KEY `hidden` (`hidden`),
  KEY `created` (`created`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `fs_groups`
--

CREATE TABLE IF NOT EXISTS `fs_groups` (
  `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `description` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=4 ;

--
-- Dumping data for table `fs_groups`
--

INSERT INTO `fs_groups` (`id`, `name`, `description`) VALUES
(1, 'admin', 'Administrator'),
(2, 'members', 'Users or Team member'),
(3, 'mod', 'Moderator');

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

--
-- Table structure for table `fs_joints`
--

CREATE TABLE IF NOT EXISTS `fs_joints` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `joint_id` int(11) NOT NULL,
  `team_id` int(11) NOT NULL,
  `created` datetime NOT NULL,
  `updated` datetime NOT NULL,
  `creator` int(11) NOT NULL,
  `editor` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `joint_id` (`joint_id`),
  KEY `team_id` (`team_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `fs_licenses`
--

CREATE TABLE IF NOT EXISTS `fs_licenses` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `comic_id` int(11) NOT NULL,
  `nation` varchar(8) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  KEY `comic_id` (`comic_id`),
  KEY `nation` (`nation`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `fs_login_attempts`
--

CREATE TABLE IF NOT EXISTS `fs_login_attempts` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `ip_address` varchar(40) COLLATE utf8_bin NOT NULL,
  `login` varchar(50) COLLATE utf8_bin NOT NULL,
  `time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `fs_memberships`
--

CREATE TABLE IF NOT EXISTS `fs_memberships` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `team_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `is_leader` int(11) NOT NULL,
  `accepted` int(11) NOT NULL,
  `requested` int(11) NOT NULL,
  `applied` int(11) NOT NULL,
  `created` datetime NOT NULL,
  `updated` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `team_id` (`team_id`),
  KEY `user_id` (`user_id`),
  KEY `is_leader` (`is_leader`),
  KEY `accepted` (`accepted`),
  KEY `requested` (`requested`),
  KEY `applied` (`applied`),
  KEY `created` (`created`),
  KEY `updated` (`updated`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `fs_migrations`
--

CREATE TABLE IF NOT EXISTS `fs_migrations` (
  `version` int(3) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Dumping data for table `fs_migrations`
--

INSERT INTO `fs_migrations` (`version`) VALUES
(8);

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

--
-- Table structure for table `fs_pages`
--

CREATE TABLE IF NOT EXISTS `fs_pages` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `chapter_id` int(11) NOT NULL,
  `filename` varchar(256) COLLATE utf8_unicode_ci NOT NULL,
  `hidden` int(11) NOT NULL,
  `created` datetime NOT NULL,
  `lastseen` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `updated` datetime NOT NULL,
  `creator` int(11) NOT NULL,
  `editor` int(11) NOT NULL,
  `height` int(11) NOT NULL,
  `width` int(11) NOT NULL,
  `mime` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `size` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `fs_preferences`
--

CREATE TABLE IF NOT EXISTS `fs_preferences` (
  `name` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `value` varchar(2048) COLLATE utf8_unicode_ci NOT NULL,
  `group` int(11) NOT NULL,
  PRIMARY KEY (`name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `fs_preferences`
--

INSERT INTO `fs_preferences` (`name`, `value`, `group`) VALUES
('fs_ads_bottom_banner', '', 0),
('fs_ads_bottom_banner_active', '', 0),
('fs_ads_bottom_banner_reload', '', 0),
('fs_ads_left_banner', '', 0),
('fs_ads_left_banner_active', '', 0),
('fs_ads_left_banner_reload', '', 0),
('fs_ads_top_banner', '', 0),
('fs_ads_top_banner_active', '', 0),
('fs_ads_top_banner_reload', '', 0),
('fs_gen_anon_team_show', '1', 0),
('fs_gen_back_url', '', 0),
('fs_gen_default_lang', 'en', 0),
('fs_gen_default_team', 'Anonymous', 0),
('fs_gen_footer_text', 'All the manga featured in this website are property of their publishers. The translations are fanmade and meant to be a preview of material unavailable for western countries.\nDo not try to profit from this material.<br/>If you liked any of the manga you obtained here, consider buying the Japanese versions, or the local translation, where available. Thanks for your support.', 0),
('fs_gen_site_title', 'A fresh FoOlSlide', 0),
('fs_priv_version', '0.8.19', 0),
('fs_srv_servers', '', 0),
('fs_geo_blocked', '', 0),
('fs_cron_autoupgrade', '1465036967', 0),
('fs_priv_maintenance', '', 0),
('fs_reg_disabled', '0', 0),
('fs_reg_recaptcha_public', '', 0),
('fs_reg_recaptcha_secret', '', 0),
('fs_reg_email_disabled', '0', 0),
('fs_dl_archive_max', '350', 0),
('fs_dl_enabled', '0', 0),
('fs_cron_autoupgrade_version', '0', 0);

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

--
-- Table structure for table `fs_profiles`
--

CREATE TABLE IF NOT EXISTS `fs_profiles` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `group_id` int(11) NOT NULL,
  `display_name` varchar(32) COLLATE utf8_bin NOT NULL,
  `twitter` varchar(32) COLLATE utf8_bin NOT NULL,
  `bio` text COLLATE utf8_bin NOT NULL,
  PRIMARY KEY (`id`),
  KEY `user_id` (`user_id`),
  KEY `group_id` (`group_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=2 ;

--
-- Dumping data for table `fs_profiles`
--

INSERT INTO `fs_profiles` (`id`, `user_id`, `group_id`, `display_name`, `twitter`, `bio`) VALUES
(1, 1, 1, '', '', '');

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

--
-- Table structure for table `fs_teams`
--

CREATE TABLE IF NOT EXISTS `fs_teams` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(256) COLLATE utf8_unicode_ci NOT NULL,
  `stub` varchar(256) COLLATE utf8_unicode_ci NOT NULL,
  `url` varchar(512) COLLATE utf8_unicode_ci NOT NULL,
  `forum` varchar(512) COLLATE utf8_unicode_ci NOT NULL,
  `irc` varchar(256) COLLATE utf8_unicode_ci NOT NULL,
  `twitter` varchar(256) COLLATE utf8_unicode_ci NOT NULL,
  `facebook` varchar(512) COLLATE utf8_unicode_ci NOT NULL,
  `facebookid` varchar(512) COLLATE utf8_unicode_ci NOT NULL,
  `created` datetime NOT NULL,
  `lastseen` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `updated` datetime NOT NULL,
  `creator` int(11) NOT NULL,
  `editor` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `name` (`name`),
  KEY `stub` (`stub`),
  KEY `created` (`created`),
  KEY `updated` (`updated`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=2 ;

--
-- Dumping data for table `fs_teams`
--

INSERT INTO `fs_teams` (`id`, `name`, `stub`, `url`, `forum`, `irc`, `twitter`, `facebook`, `facebookid`, `created`, `lastseen`, `updated`, `creator`, `editor`) VALUES
(1, 'Anonymous', 'anonymous', '', '', '', '', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 1, 1);

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

--
-- Table structure for table `fs_user_autologin`
--

CREATE TABLE IF NOT EXISTS `fs_user_autologin` (
  `key_id` char(32) COLLATE utf8_bin NOT NULL,
  `user_id` int(11) NOT NULL DEFAULT '0',
  `user_agent` varchar(150) COLLATE utf8_bin NOT NULL,
  `last_ip` varchar(40) COLLATE utf8_bin NOT NULL,
  `last_login` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`key_id`,`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

