-- https://www.phpmyadmin.net/
--
-- Creato il: Giu 06, 2019 alle 21:18
-- Versione del server: 10.1.32-MariaDB
-- Versione PHP: 5.6.36

START TRANSACTION;



--
-- Database: `fool`
--

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

--
-- Struttura della tabella `fs_archives`
--

CREATE TABLE `fs_archives` (
  `id` int(11) NOT NULL,
  `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
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

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

--
-- Struttura della tabella `fs_chapters`
--

CREATE TABLE `fs_chapters` (
  `id` int(11) NOT NULL,
  `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
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

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

--
-- Struttura della tabella `fs_comics`
--

CREATE TABLE `fs_comics` (
  `id` int(11) NOT NULL,
  `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
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

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

--
-- Struttura della tabella `fs_groups`
--

CREATE TABLE `fs_groups` (
  `id` mediumint(8) UNSIGNED NOT NULL,
  `name` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `description` varchar(100) COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dump dei dati per la tabella `fs_groups`
--

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

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

--
-- Struttura della tabella `fs_joints`
--

CREATE TABLE `fs_joints` (
  `id` int(11) NOT NULL,
  `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
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

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

--
-- Struttura della tabella `fs_licenses`
--

CREATE TABLE `fs_licenses` (
  `id` int(11) NOT NULL,
  `comic_id` int(11) NOT NULL,
  `nation` varchar(8) COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

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

--
-- Struttura della tabella `fs_login_attempts`
--

CREATE TABLE `fs_login_attempts` (
  `id` int(11) NOT NULL,
  `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
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

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

--
-- Struttura della tabella `fs_memberships`
--

CREATE TABLE `fs_memberships` (
  `id` int(11) NOT NULL,
  `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
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

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

--
-- Struttura della tabella `fs_migrations`
--

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

--
-- Dump dei dati per la tabella `fs_migrations`
--

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

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

--
-- Struttura della tabella `fs_pages`
--

CREATE TABLE `fs_pages` (
  `id` int(11) NOT NULL,
  `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
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

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

--
-- Struttura della tabella `fs_preferences`
--

CREATE TABLE `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
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dump dei dati per la tabella `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_cron_autoupgrade', '1559843028', 0),
('fs_cron_autoupgrade_version', '0', 0),
('fs_dl_archive_max', '350', 0),
('fs_dl_enabled', '0', 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', 'If you liked any of the manga you obtained here, consider buying the original versions, or the local translation, where available. Thanks for your support.', 0),
('fs_gen_site_title', 'A fresh FoOlSlide', 0),
('fs_geo_blocked', '', 0),
('fs_priv_maintenance', '', 0),
('fs_priv_version', '2.4.0', 0),
('fs_reg_disabled', '0', 0),
('fs_reg_email_disabled', '0', 0),
('fs_reg_recaptcha_public', '', 0),
('fs_reg_recaptcha_secret', '', 0),
('fs_srv_servers', '', 0);

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

--
-- Struttura della tabella `fs_profiles`
--

CREATE TABLE `fs_profiles` (
  `id` int(11) NOT NULL,
  `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
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

--
-- Dump dei dati per la tabella `fs_profiles`
--

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

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

--
-- Struttura della tabella `fs_teams`
--

CREATE TABLE `fs_teams` (
  `id` int(11) NOT NULL,
  `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
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dump dei dati per la tabella `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);

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

--
-- Struttura della tabella `fs_user_autologin`
--

CREATE TABLE `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
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

--
-- Indici per le tabelle scaricate
--

--
-- Indici per le tabelle `fs_archives`
--
ALTER TABLE `fs_archives`
  ADD PRIMARY KEY (`id`),
  ADD KEY `size` (`size`),
  ADD KEY `chapter_id` (`chapter_id`);

--
-- Indici per le tabelle `fs_chapters`
--
ALTER TABLE `fs_chapters`
  ADD PRIMARY KEY (`id`),
  ADD KEY `created` (`created`),
  ADD KEY `comic_id` (`comic_id`),
  ADD KEY `team_id` (`team_id`),
  ADD KEY `joint_id` (`joint_id`),
  ADD KEY `chapter` (`chapter`),
  ADD KEY `subchapter` (`subchapter`),
  ADD KEY `volume` (`volume`),
  ADD KEY `language` (`language`),
  ADD KEY `stub` (`stub`(255)),
  ADD KEY `uniqid` (`uniqid`),
  ADD KEY `updated` (`updated`);

--
-- Indici per le tabelle `fs_comics`
--
ALTER TABLE `fs_comics`
  ADD PRIMARY KEY (`id`),
  ADD KEY `stub` (`stub`(255)),
  ADD KEY `uniqid` (`uniqid`(255)),
  ADD KEY `hidden` (`hidden`),
  ADD KEY `created` (`created`);

--
-- Indici per le tabelle `fs_groups`
--
ALTER TABLE `fs_groups`
  ADD PRIMARY KEY (`id`);

--
-- Indici per le tabelle `fs_joints`
--
ALTER TABLE `fs_joints`
  ADD PRIMARY KEY (`id`),
  ADD KEY `joint_id` (`joint_id`),
  ADD KEY `team_id` (`team_id`);

--
-- Indici per le tabelle `fs_licenses`
--
ALTER TABLE `fs_licenses`
  ADD PRIMARY KEY (`id`),
  ADD KEY `comic_id` (`comic_id`),
  ADD KEY `nation` (`nation`);

--
-- Indici per le tabelle `fs_login_attempts`
--
ALTER TABLE `fs_login_attempts`
  ADD PRIMARY KEY (`id`);

--
-- Indici per le tabelle `fs_memberships`
--
ALTER TABLE `fs_memberships`
  ADD PRIMARY KEY (`id`),
  ADD KEY `team_id` (`team_id`),
  ADD KEY `user_id` (`user_id`),
  ADD KEY `is_leader` (`is_leader`),
  ADD KEY `accepted` (`accepted`),
  ADD KEY `requested` (`requested`),
  ADD KEY `applied` (`applied`),
  ADD KEY `created` (`created`),
  ADD KEY `updated` (`updated`);

--
-- Indici per le tabelle `fs_pages`
--
ALTER TABLE `fs_pages`
  ADD PRIMARY KEY (`id`);

--
-- Indici per le tabelle `fs_preferences`
--
ALTER TABLE `fs_preferences`
  ADD PRIMARY KEY (`name`);

--
-- Indici per le tabelle `fs_profiles`
--
ALTER TABLE `fs_profiles`
  ADD PRIMARY KEY (`id`),
  ADD KEY `user_id` (`user_id`),
  ADD KEY `group_id` (`group_id`);

--
-- Indici per le tabelle `fs_teams`
--
ALTER TABLE `fs_teams`
  ADD PRIMARY KEY (`id`),
  ADD KEY `name` (`name`(255)),
  ADD KEY `stub` (`stub`(255)),
  ADD KEY `created` (`created`),
  ADD KEY `updated` (`updated`);

--
-- Indici per le tabelle `fs_user_autologin`
--
ALTER TABLE `fs_user_autologin`
  ADD PRIMARY KEY (`key_id`,`user_id`);

--
-- AUTO_INCREMENT per le tabelle scaricate
--

--
-- AUTO_INCREMENT per la tabella `fs_archives`
--
ALTER TABLE `fs_archives`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT per la tabella `fs_chapters`
--
ALTER TABLE `fs_chapters`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT per la tabella `fs_comics`
--
ALTER TABLE `fs_comics`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT per la tabella `fs_groups`
--
ALTER TABLE `fs_groups`
  MODIFY `id` mediumint(8) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT per la tabella `fs_joints`
--
ALTER TABLE `fs_joints`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT per la tabella `fs_licenses`
--
ALTER TABLE `fs_licenses`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT per la tabella `fs_login_attempts`
--
ALTER TABLE `fs_login_attempts`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT per la tabella `fs_memberships`
--
ALTER TABLE `fs_memberships`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT per la tabella `fs_pages`
--
ALTER TABLE `fs_pages`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT per la tabella `fs_profiles`
--
ALTER TABLE `fs_profiles`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT per la tabella `fs_teams`
--
ALTER TABLE `fs_teams`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
COMMIT;

