-- phpMyAdmin SQL Dump
-- version 5.2.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Tempo de geração: 23/10/2025 às 14:05
-- Versão do servidor: 10.6.23-MariaDB-log
-- Versão do PHP: 8.4.13

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";


/*!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 utf8mb4 */;

--
-- Banco de dados: `booknacho_database`
--

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

--
-- Estrutura para tabela `achievements`
--

CREATE TABLE `achievements` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `image` varchar(255) DEFAULT NULL,
  `description` text NOT NULL,
  `type` varchar(255) NOT NULL,
  `threshold` int(11) NOT NULL,
  `item_order` int(11) NOT NULL DEFAULT 0,
  `status` int(11) NOT NULL DEFAULT 1
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Estrutura para tabela `activity_log`
--

CREATE TABLE `activity_log` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `log_name` varchar(255) DEFAULT NULL,
  `description` text NOT NULL,
  `subject_type` varchar(255) DEFAULT NULL,
  `subject_id` bigint(20) UNSIGNED DEFAULT NULL,
  `user_type` varchar(255) DEFAULT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `properties` text DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Estrutura para tabela `animmation`
--

CREATE TABLE `animmation` (
  `id` int(2) NOT NULL,
  `name` varchar(255) DEFAULT NULL COMMENT 'level name',
  `grade` varchar(255) DEFAULT NULL COMMENT 'grade range',
  `source` varchar(255) DEFAULT NULL,
  `timestamp` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Estrutura para tabela `articles`
--

CREATE TABLE `articles` (
  `id` int(20) NOT NULL,
  `type` varchar(45) DEFAULT 'article',
  `isbn` varchar(255) DEFAULT NULL,
  `level` int(2) DEFAULT NULL,
  `title` varchar(255) DEFAULT NULL,
  `author` varchar(255) DEFAULT NULL,
  `publisher` varchar(255) DEFAULT NULL,
  `pub_year` int(4) DEFAULT NULL,
  `creatorid` int(10) DEFAULT NULL COMMENT 'user added by id',
  `image` int(20) DEFAULT NULL COMMENT 'main article image',
  `pages` int(11) DEFAULT NULL,
  `funfacts` int(12) DEFAULT NULL,
  `poem` int(10) DEFAULT NULL COMMENT 'poems table id',
  `quiz` int(10) DEFAULT NULL COMMENT 'quiz id',
  `wordlist` int(10) DEFAULT NULL COMMENT 'wordlist id',
  `spanish` int(2) NOT NULL COMMENT 'spanish article id',
  `video` int(10) DEFAULT NULL COMMENT 'video id',
  `song_id` int(11) DEFAULT NULL,
  `sound` int(10) DEFAULT NULL COMMENT 'sound id',
  `animation` int(10) DEFAULT NULL COMMENT 'animation id',
  `pdfs` int(10) DEFAULT NULL COMMENT 'pdf id',
  `summary` varchar(255) DEFAULT NULL COMMENT 'short description',
  `linked` varchar(255) DEFAULT NULL COMMENT 'array of other articles similiar',
  `catArray` varchar(255) DEFAULT NULL,
  `sectionsArray` varchar(255) DEFAULT NULL COMMENT 'array of ids from id sections',
  `section1` text CHARACTER SET utf8mb4 COLLATE utf8mb4_croatian_ci DEFAULT NULL COMMENT '1st section',
  `image1` int(10) DEFAULT NULL,
  `section2` text CHARACTER SET utf8mb4 COLLATE utf8mb4_croatian_ci DEFAULT NULL COMMENT '2nd section',
  `image2` int(10) DEFAULT NULL,
  `section3` text CHARACTER SET utf8mb4 COLLATE utf8mb4_croatian_ci DEFAULT NULL,
  `image3` int(10) DEFAULT NULL,
  `section4` text CHARACTER SET utf8mb4 COLLATE utf8mb4_croatian_ci DEFAULT NULL,
  `image4` int(10) DEFAULT NULL,
  `section5` text CHARACTER SET utf8mb4 COLLATE utf8mb4_croatian_ci DEFAULT NULL,
  `image5` int(10) DEFAULT NULL,
  `section6` text CHARACTER SET utf8mb4 COLLATE utf8mb4_croatian_ci DEFAULT NULL,
  `image6` int(10) DEFAULT NULL,
  `section7` text DEFAULT NULL,
  `image7` int(10) DEFAULT NULL,
  `section8` text DEFAULT NULL,
  `image8` int(10) DEFAULT NULL,
  `section9` text DEFAULT NULL,
  `image9` int(10) DEFAULT NULL,
  `section10` text DEFAULT NULL,
  `image10` int(10) DEFAULT NULL,
  `section11` text DEFAULT NULL,
  `image11` int(10) DEFAULT NULL,
  `section12` text DEFAULT NULL,
  `image12` int(10) DEFAULT NULL,
  `wordcnt` int(10) DEFAULT NULL,
  `source` varchar(255) DEFAULT NULL,
  `review` int(1) NOT NULL DEFAULT 0,
  `active` int(1) NOT NULL DEFAULT 0,
  `timestamp` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `pubdate` date DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Estrutura para tabela `articles_del`
--

CREATE TABLE `articles_del` (
  `id` int(20) NOT NULL,
  `isbn` varchar(255) DEFAULT NULL,
  `level` int(2) DEFAULT NULL,
  `title` varchar(255) DEFAULT NULL,
  `author` varchar(255) DEFAULT NULL,
  `publisher` varchar(255) DEFAULT NULL,
  `pub_year` int(4) DEFAULT NULL,
  `creatorid` int(10) DEFAULT NULL COMMENT 'user added by id',
  `image` int(20) DEFAULT NULL COMMENT 'main article image',
  `pages` int(11) DEFAULT NULL,
  `funfacts` int(12) DEFAULT NULL,
  `poem` int(10) DEFAULT NULL COMMENT 'poems table id',
  `quiz` int(10) DEFAULT NULL COMMENT 'quiz id',
  `wordlist` int(10) DEFAULT NULL COMMENT 'wordlist id',
  `spanish` int(2) NOT NULL COMMENT 'spanish article id',
  `video` int(10) DEFAULT NULL COMMENT 'video id',
  `sound` int(10) DEFAULT NULL COMMENT 'sound id',
  `animation` int(10) DEFAULT NULL COMMENT 'animation id',
  `pdfs` int(10) DEFAULT NULL COMMENT 'pdf id',
  `summary` varchar(255) DEFAULT NULL COMMENT 'short description',
  `linked` varchar(255) DEFAULT NULL COMMENT 'array of other articles similiar',
  `catArray` varchar(255) DEFAULT NULL,
  `sectionsArray` varchar(255) DEFAULT NULL COMMENT 'array of ids from id sections',
  `section1` text DEFAULT NULL COMMENT '1st section',
  `image1` int(10) DEFAULT NULL,
  `section2` text DEFAULT NULL COMMENT '2nd section',
  `image2` int(10) DEFAULT NULL,
  `section3` text DEFAULT NULL,
  `image3` int(10) DEFAULT NULL,
  `section4` text DEFAULT NULL,
  `image4` int(10) DEFAULT NULL,
  `section5` text DEFAULT NULL,
  `image5` int(10) DEFAULT NULL,
  `section6` text DEFAULT NULL,
  `image6` int(10) DEFAULT NULL,
  `section7` text DEFAULT NULL,
  `image7` int(10) DEFAULT NULL,
  `section8` text DEFAULT NULL,
  `image8` int(10) DEFAULT NULL,
  `section9` text DEFAULT NULL,
  `image9` int(10) DEFAULT NULL,
  `section10` text DEFAULT NULL,
  `image10` int(10) DEFAULT NULL,
  `section11` text DEFAULT NULL,
  `image11` int(10) DEFAULT NULL,
  `section12` text DEFAULT NULL,
  `image12` int(10) DEFAULT NULL,
  `wordcnt` int(10) DEFAULT NULL,
  `source` varchar(255) DEFAULT NULL,
  `review` int(1) NOT NULL DEFAULT 0,
  `active` int(1) NOT NULL DEFAULT 0,
  `timestamp` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `pubdate` date DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Estrutura para tabela `article_history`
--

CREATE TABLE `article_history` (
  `history_id` int(11) NOT NULL,
  `article_id` int(20) NOT NULL,
  `user_id` int(11) NOT NULL,
  `changed_at` datetime NOT NULL DEFAULT current_timestamp(),
  `diff` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '{"campo": {"old": "...", "new": "..."}, ...}' CHECK (json_valid(`diff`))
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Estrutura para tabela `article_history_payments`
--

CREATE TABLE `article_history_payments` (
  `article_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `paid` tinyint(1) NOT NULL DEFAULT 0,
  `paid_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Estrutura para tabela `avatars`
--

CREATE TABLE `avatars` (
  `id` int(11) NOT NULL,
  `image` varchar(255) NOT NULL,
  `goal` int(11) NOT NULL,
  `status` int(11) NOT NULL DEFAULT 1,
  `created` timestamp NOT NULL DEFAULT current_timestamp(),
  `item_order` int(11) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Estrutura para tabela `badges`
--

CREATE TABLE `badges` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `image` varchar(255) DEFAULT NULL,
  `description` text NOT NULL,
  `type` varchar(255) NOT NULL,
  `threshold` int(11) NOT NULL,
  `item_order` int(11) NOT NULL DEFAULT 0,
  `status` int(11) NOT NULL DEFAULT 1
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Estrutura para tabela `badwords`
--

CREATE TABLE `badwords` (
  `id` int(11) NOT NULL,
  `badwords` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estrutura para tabela `battles`
--

CREATE TABLE `battles` (
  `id` int(11) NOT NULL,
  `id_article` int(11) NOT NULL,
  `title` varchar(255) NOT NULL,
  `type` varchar(45) DEFAULT 'battle',
  `status` tinyint(1) DEFAULT 1
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Estrutura para tabela `battle_options`
--

CREATE TABLE `battle_options` (
  `id` int(11) NOT NULL,
  `title` varchar(255) NOT NULL,
  `id_battle` int(11) NOT NULL,
  `is_winner` tinyint(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Estrutura para tabela `battle_votes`
--

CREATE TABLE `battle_votes` (
  `id` int(11) NOT NULL,
  `id_student` int(11) NOT NULL,
  `id_option` int(11) NOT NULL,
  `id_battle` int(11) NOT NULL,
  `timestamp` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Estrutura para tabela `booklists`
--

CREATE TABLE `booklists` (
  `id` int(11) NOT NULL,
  `isbn` varchar(20) NOT NULL,
  `words1` varchar(255) NOT NULL,
  `words2` varchar(255) NOT NULL,
  `words3` varchar(255) NOT NULL,
  `words4` varchar(255) NOT NULL,
  `words5` varchar(255) NOT NULL,
  `words6` varchar(255) NOT NULL,
  `words7` varchar(255) NOT NULL,
  `words8` varchar(255) NOT NULL,
  `words9` varchar(255) NOT NULL,
  `words10` varchar(255) NOT NULL,
  `words11` varchar(255) NOT NULL,
  `words12` varchar(255) NOT NULL,
  `wordlist` text DEFAULT NULL,
  `wordcnt` int(2) NOT NULL DEFAULT 0,
  `creatoruserid` int(11) DEFAULT 5,
  `added_timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Estrutura para tabela `booklists_del`
--

CREATE TABLE `booklists_del` (
  `id` int(11) NOT NULL,
  `isbn` varchar(20) NOT NULL,
  `words1` varchar(255) NOT NULL,
  `words2` varchar(255) NOT NULL,
  `words3` varchar(255) NOT NULL,
  `words4` varchar(255) NOT NULL,
  `words5` varchar(255) NOT NULL,
  `words6` varchar(255) NOT NULL,
  `words7` varchar(255) NOT NULL,
  `words8` varchar(255) NOT NULL,
  `words9` varchar(255) NOT NULL,
  `words10` varchar(255) NOT NULL,
  `words11` varchar(255) NOT NULL,
  `words12` varchar(255) NOT NULL,
  `wordlist` text DEFAULT NULL,
  `wordcnt` int(2) NOT NULL DEFAULT 0,
  `creatoruserid` int(11) DEFAULT 5,
  `added_timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Estrutura para tabela `bookquiz`
--

CREATE TABLE `bookquiz` (
  `id` int(12) NOT NULL,
  `isbn` varchar(60) NOT NULL,
  `BookName` varchar(150) DEFAULT NULL,
  `section` int(2) DEFAULT NULL,
  `Question` varchar(256) DEFAULT NULL,
  `Answer` varchar(300) DEFAULT NULL,
  `A1` varchar(356) DEFAULT NULL,
  `A2` varchar(356) DEFAULT NULL,
  `A3` varchar(356) DEFAULT NULL,
  `approveuserid` int(10) NOT NULL DEFAULT 1,
  `reviewuserid` int(10) NOT NULL DEFAULT 1,
  `creatoruserid` int(10) NOT NULL DEFAULT 1,
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `created` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Estrutura para tabela `bookquiz_del`
--

CREATE TABLE `bookquiz_del` (
  `id` int(12) NOT NULL,
  `isbn` varchar(60) NOT NULL,
  `BookName` varchar(150) DEFAULT NULL,
  `section` int(2) DEFAULT NULL,
  `Question` varchar(256) DEFAULT NULL,
  `Answer` varchar(300) DEFAULT NULL,
  `A1` varchar(356) DEFAULT NULL,
  `A2` varchar(356) DEFAULT NULL,
  `A3` varchar(356) DEFAULT NULL,
  `approveuserid` int(10) NOT NULL DEFAULT 1,
  `reviewuserid` int(10) NOT NULL DEFAULT 1,
  `creatoruserid` int(10) NOT NULL DEFAULT 1,
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `created` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Estrutura para tabela `clever_tokens`
--

CREATE TABLE `clever_tokens` (
  `id` int(11) NOT NULL,
  `user_uid` varchar(255) DEFAULT NULL,
  `token` varchar(255) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `code` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Estrutura para tabela `coupons`
--

CREATE TABLE `coupons` (
  `id` int(11) NOT NULL,
  `code` varchar(50) NOT NULL,
  `discount_type` enum('percentage','fixed') NOT NULL,
  `discount_value` decimal(10,2) NOT NULL,
  `expiry_date` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `applicable_site` varchar(20) DEFAULT NULL,
  `applicable_user` varchar(255) DEFAULT NULL,
  `used_once` tinyint(1) NOT NULL DEFAULT 1,
  `status` int(11) NOT NULL DEFAULT 1,
  `amount_use` int(11) NOT NULL DEFAULT 1,
  `automatic` int(11) NOT NULL DEFAULT 0,
  `auto_generated` tinyint(1) NOT NULL DEFAULT 0,
  `couponable_type` varchar(255) DEFAULT NULL,
  `couponable_id` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Estrutura para tabela `coupon_reservations`
--

CREATE TABLE `coupon_reservations` (
  `id_coupon` int(11) NOT NULL,
  `id_teacher` int(11) NOT NULL,
  `reservation_time` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

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

--
-- Estrutura para tabela `customs_achievements`
--

CREATE TABLE `customs_achievements` (
  `id` int(11) NOT NULL,
  `id_teacher` int(11) NOT NULL,
  `image` varchar(255) NOT NULL,
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Estrutura para tabela `deleted_data`
--

CREATE TABLE `deleted_data` (
  `id` int(11) NOT NULL,
  `original_table_name` varchar(255) NOT NULL,
  `deleted_data` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL CHECK (json_valid(`deleted_data`)),
  `deleted_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Estrutura para tabela `fish_templates`
--

CREATE TABLE `fish_templates` (
  `id` int(11) NOT NULL,
  `id_sprite` int(11) NOT NULL,
  `rarity` varchar(20) NOT NULL,
  `size` int(11) NOT NULL,
  `feed_reward` int(11) NOT NULL,
  `play_reward` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Estrutura para tabela `funfacts`
--

CREATE TABLE `funfacts` (
  `id` int(2) NOT NULL,
  `isbn` varchar(30) DEFAULT NULL,
  `title` varchar(255) DEFAULT NULL COMMENT 'article title',
  `lev` int(2) DEFAULT NULL COMMENT 'level 1-6',
  `fact` varchar(255) DEFAULT NULL COMMENT 'article fun fact',
  `timestamp` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Estrutura para tabela `groups`
--

CREATE TABLE `groups` (
  `id` int(11) NOT NULL,
  `id_teacher` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `access_level` varchar(255) NOT NULL DEFAULT '["Level 1","Level 2","Level 3"]',
  `article_words_per_minute` varchar(255) NOT NULL DEFAULT '[220,260,300]',
  `teacher_content` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Estrutura para tabela `groups_students`
--

CREATE TABLE `groups_students` (
  `id` int(11) NOT NULL,
  `id_group` int(11) NOT NULL,
  `id_student` int(11) NOT NULL,
  `id_teacher` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Estrutura para tabela `icons`
--

CREATE TABLE `icons` (
  `id` int(2) NOT NULL,
  `name` varchar(255) DEFAULT NULL COMMENT 'level name',
  `grade` varchar(255) DEFAULT NULL COMMENT 'grade range',
  `type` varchar(255) DEFAULT NULL,
  `source` varchar(255) DEFAULT NULL,
  `originalSource` varchar(255) DEFAULT NULL COMMENT 'Original Image Source title',
  `timestamp` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Estrutura para tabela `images`
--

CREATE TABLE `images` (
  `id` int(2) NOT NULL,
  `name` varchar(255) DEFAULT NULL COMMENT 'level name',
  `type` varchar(255) DEFAULT NULL,
  `source` varchar(255) DEFAULT NULL,
  `timestamp` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `displayed_in` varchar(50) DEFAULT 'categories_thumbnail',
  `cropped` int(11) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Estrutura para tabela `level`
--

CREATE TABLE `level` (
  `id` int(2) NOT NULL,
  `name` varchar(255) DEFAULT NULL COMMENT 'level name',
  `grade` varchar(255) DEFAULT NULL COMMENT 'grade range',
  `textRange` varchar(255) DEFAULT NULL COMMENT 'number of sentences for each section',
  `wordsNum` varchar(255) DEFAULT NULL COMMENT 'Number of words per section',
  `quiz_qus` int(11) NOT NULL DEFAULT 1,
  `points` int(2) DEFAULT NULL,
  `timestamp` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Estrutura para tabela `log_cron`
--

CREATE TABLE `log_cron` (
  `id` int(11) NOT NULL,
  `teacher_id` int(11) NOT NULL,
  `email_sent` datetime NOT NULL,
  `notification_type` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Estrutura para tabela `log_cron_unsubscribe`
--

CREATE TABLE `log_cron_unsubscribe` (
  `id` int(11) NOT NULL,
  `teacher_id` int(11) NOT NULL,
  `notification_type` varchar(100) NOT NULL,
  `unsubscribed_at` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Estrutura para tabela `maincat`
--

CREATE TABLE `maincat` (
  `id` int(10) NOT NULL,
  `name` varchar(255) DEFAULT NULL COMMENT 'main catagories names',
  `sectionArray` varchar(255) DEFAULT NULL,
  `icon` int(11) DEFAULT NULL COMMENT 'icon table id - thumbnail',
  `level_id` int(10) DEFAULT NULL,
  `poem_type_id` int(11) NOT NULL DEFAULT 0,
  `order_me` int(3) DEFAULT NULL COMMENT 'arrange ASC by order_me ',
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Estrutura para tabela `modules`
--

CREATE TABLE `modules` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `description` varchar(255) DEFAULT NULL,
  `image` varchar(255) DEFAULT NULL,
  `video` varchar(255) DEFAULT NULL,
  `type` varchar(255) DEFAULT NULL,
  `getdata` varchar(255) DEFAULT NULL,
  `status` int(11) NOT NULL DEFAULT 0,
  `item_order` int(11) NOT NULL,
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp(),
  `html` int(11) NOT NULL DEFAULT 0,
  `test` int(11) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Estrutura para tabela `modules_files`
--

CREATE TABLE `modules_files` (
  `id` int(11) NOT NULL,
  `id_module` int(11) NOT NULL,
  `version` int(11) NOT NULL,
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp(),
  `active` int(11) NOT NULL DEFAULT 1
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Estrutura para tabela `needwords`
--

CREATE TABLE `needwords` (
  `id` int(10) NOT NULL,
  `Word` varchar(255) DEFAULT NULL,
  `times` int(5) DEFAULT 1,
  `movedLive` int(1) NOT NULL DEFAULT 0,
  `updatedate` timestamp NOT NULL DEFAULT current_timestamp(),
  `Sentence` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Estrutura para tabela `newwords`
--

CREATE TABLE `newwords` (
  `id` int(10) NOT NULL,
  `Word` varchar(255) DEFAULT NULL,
  `Sentence` varchar(255) DEFAULT NULL,
  `mp3Created` int(1) NOT NULL DEFAULT 0,
  `movedLive` int(1) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Estrutura para tabela `pages`
--

CREATE TABLE `pages` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `slug` varchar(255) NOT NULL,
  `content` text DEFAULT NULL,
  `meta_title` varchar(255) DEFAULT NULL,
  `meta_description` varchar(255) DEFAULT NULL,
  `status` int(11) NOT NULL DEFAULT 1,
  `item_order` int(11) NOT NULL DEFAULT 0,
  `always_on` int(11) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Estrutura para tabela `pdf`
--

CREATE TABLE `pdf` (
  `id` int(2) NOT NULL,
  `name` varchar(255) DEFAULT NULL COMMENT 'level name',
  `grade` varchar(255) DEFAULT NULL COMMENT 'grade range',
  `source` varchar(255) DEFAULT NULL,
  `timestamp` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Estrutura para tabela `poems`
--

CREATE TABLE `poems` (
  `id` int(2) NOT NULL,
  `isbn` varchar(20) DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL COMMENT 'article name',
  `lev` int(2) DEFAULT NULL COMMENT 'level 1-6',
  `poem` text DEFAULT NULL COMMENT 'poem text',
  `poemType` int(2) DEFAULT NULL COMMENT 'poemType id',
  `timestamp` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Estrutura para tabela `poemtype`
--

CREATE TABLE `poemtype` (
  `id` int(11) NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `description` varchar(255) DEFAULT NULL,
  `textRange` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Estrutura para tabela `polls`
--

CREATE TABLE `polls` (
  `id` int(11) NOT NULL,
  `title` varchar(255) NOT NULL,
  `status` int(11) NOT NULL DEFAULT 1,
  `item_order` int(11) DEFAULT NULL,
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Estrutura para tabela `polls_options`
--

CREATE TABLE `polls_options` (
  `id` int(11) NOT NULL,
  `id_poll` int(11) NOT NULL,
  `option_text` varchar(255) NOT NULL,
  `manual_votes` int(11) DEFAULT 0,
  `computed_votes` int(11) DEFAULT 0,
  `total_votes` int(11) GENERATED ALWAYS AS (`manual_votes` + `computed_votes`) STORED
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Estrutura para tabela `polls_options_suggestions`
--

CREATE TABLE `polls_options_suggestions` (
  `id` int(11) NOT NULL,
  `id_poll` int(11) NOT NULL,
  `id_teacher` int(11) NOT NULL,
  `option_text` varchar(255) NOT NULL,
  `status` int(11) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Estrutura para tabela `polls_records`
--

CREATE TABLE `polls_records` (
  `id` int(11) NOT NULL,
  `id_teacher` int(11) NOT NULL,
  `id_option` int(11) NOT NULL,
  `vote_date` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Estrutura para tabela `posts`
--

CREATE TABLE `posts` (
  `id` int(11) NOT NULL,
  `title` varchar(255) DEFAULT NULL,
  `resume` mediumtext DEFAULT NULL,
  `meta_title` varchar(255) NOT NULL,
  `meta_description` varchar(255) NOT NULL,
  `slug` varchar(255) DEFAULT NULL,
  `publication_date` timestamp NOT NULL DEFAULT current_timestamp(),
  `image` varchar(255) DEFAULT NULL,
  `content` text DEFAULT NULL,
  `status` tinyint(1) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estrutura para tabela `reportcard`
--

CREATE TABLE `reportcard` (
  `id` int(10) NOT NULL,
  `id_student` int(11) DEFAULT NULL,
  `id_teacher` int(10) DEFAULT NULL,
  `id_article` int(10) DEFAULT NULL,
  `level` int(1) NOT NULL DEFAULT 1,
  `isbn` varchar(15) DEFAULT NULL,
  `listname` varchar(160) DEFAULT NULL,
  `stu_grade` int(2) DEFAULT NULL,
  `date` varchar(50) NOT NULL DEFAULT '00-00-0000',
  `mypaper` text DEFAULT NULL,
  `words_incorrect` text DEFAULT NULL,
  `words_correct` text DEFAULT NULL,
  `incorrect_words_corrected` text DEFAULT NULL,
  `answers` text DEFAULT NULL,
  `quizscore` int(4) NOT NULL DEFAULT 0,
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp(),
  `id_module` int(11) NOT NULL DEFAULT 0,
  `mod_name` varchar(150) DEFAULT NULL,
  `timed` varchar(40) NOT NULL DEFAULT '0',
  `modusage` int(11) NOT NULL DEFAULT 1
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Estrutura para tabela `report_cache`
--

CREATE TABLE `report_cache` (
  `id` bigint(20) NOT NULL,
  `log_name` varchar(255) DEFAULT NULL,
  `description` varchar(255) DEFAULT NULL,
  `user_type` varchar(100) DEFAULT NULL,
  `user_id` int(11) DEFAULT NULL,
  `properties` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`properties`)),
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Estrutura para tabela `report_settings`
--

CREATE TABLE `report_settings` (
  `id` int(11) NOT NULL,
  `title` varchar(255) NOT NULL,
  `icon` varchar(255) NOT NULL,
  `slug` varchar(255) NOT NULL,
  `group` varchar(255) NOT NULL DEFAULT 'default',
  `item_order` int(11) DEFAULT 0,
  `active` tinyint(1) DEFAULT 0,
  `active_for_student` tinyint(1) NOT NULL DEFAULT 0,
  `created_at` timestamp NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Estrutura para tabela `reviewer_article`
--

CREATE TABLE `reviewer_article` (
  `id` int(11) NOT NULL,
  `articles_id` int(11) NOT NULL COMMENT 'articles tbl id clm',
  `users_bn_id` int(11) NOT NULL COMMENT 'users_bn tbl id clm',
  `review_stage` int(11) NOT NULL,
  `complete_at` datetime DEFAULT NULL,
  `assign_by_user_bn_id` int(11) NOT NULL COMMENT 'user bn tbl id clm value',
  `status` varchar(10) NOT NULL DEFAULT 'Pending',
  `timestart` datetime DEFAULT NULL COMMENT 'reviewing start',
  `wordsstart` int(11) NOT NULL COMMENT 'reviewing start count previous wrd cnt',
  `timeend` datetime DEFAULT NULL COMMENT 'reviewing complete',
  `wordsend` int(11) NOT NULL COMMENT 'reviewing completed count current wrd cnt',
  `totaltime` time DEFAULT NULL COMMENT 'reviewing time(com-start)',
  `totalwords` int(11) NOT NULL COMMENT 'diffrence start and completed wrd cnt',
  `ratinggiven` int(11) NOT NULL COMMENT 'next reviewer given rating',
  `data_start` text NOT NULL COMMENT 'Previous article data(revewing start)',
  `data_end` text NOT NULL COMMENT 'after Completed article data(revewing end submit) for what was changed in data',
  `created_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Estrutura para tabela `scripts`
--

CREATE TABLE `scripts` (
  `id` int(11) NOT NULL,
  `title` varchar(255) NOT NULL,
  `pattern` varchar(255) NOT NULL,
  `apply_to_children` tinyint(1) NOT NULL DEFAULT 0,
  `target` enum('all','trial','premium','both') DEFAULT 'all',
  `script_content` text NOT NULL,
  `status` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estrutura para tabela `sections`
--

CREATE TABLE `sections` (
  `id` int(20) NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `description` text DEFAULT NULL COMMENT 'description',
  `special` int(1) NOT NULL DEFAULT 0,
  `specialText` varchar(255) DEFAULT NULL,
  `timestamp` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `level` int(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Estrutura para tabela `sections_group`
--

CREATE TABLE `sections_group` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Estrutura para tabela `sections_group_items`
--

CREATE TABLE `sections_group_items` (
  `id` int(11) NOT NULL,
  `group_id` int(11) NOT NULL,
  `section_id` int(11) NOT NULL,
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `position` int(11) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Estrutura para tabela `settings`
--

CREATE TABLE `settings` (
  `id` int(11) NOT NULL,
  `php_errors` int(11) NOT NULL DEFAULT 0,
  `maintenance_mode` tinyint(1) NOT NULL DEFAULT 0,
  `maintenance_mode_text` text DEFAULT NULL,
  `css_version` int(11) NOT NULL DEFAULT 1,
  `js_version` int(11) NOT NULL DEFAULT 1,
  `use_recaptcha` int(11) NOT NULL DEFAULT 0,
  `recaptcha_secret_key` text DEFAULT NULL,
  `recaptcha_public_key` text DEFAULT NULL,
  `smtp_charset` varchar(50) DEFAULT NULL,
  `smtp_host` varchar(255) DEFAULT NULL,
  `smtp_username` varchar(255) DEFAULT NULL,
  `smtp_password` varchar(255) DEFAULT NULL,
  `smtp_port` int(11) DEFAULT NULL,
  `smtp_from_name` varchar(255) DEFAULT NULL,
  `smtp_from` varchar(255) DEFAULT NULL,
  `smtp_auth` varchar(10) DEFAULT 'no',
  `smtp_verify_peer` tinyint(1) DEFAULT 0,
  `smtp_verify_peer_name` tinyint(1) DEFAULT 0,
  `smtp_allow_self_signed` tinyint(1) DEFAULT 0,
  `smtp_secure` varchar(255) DEFAULT NULL,
  `recovery_code_subject` varchar(255) DEFAULT NULL,
  `confirm_code_subject` varchar(255) DEFAULT NULL,
  `article_downtime` int(11) NOT NULL DEFAULT 60000,
  `album_page_count` int(11) NOT NULL DEFAULT 8,
  `terms_title` varchar(255) DEFAULT NULL,
  `terms_content` longtext DEFAULT NULL,
  `trial_days` int(12) NOT NULL DEFAULT 7,
  `stripe_test_mode` tinyint(1) NOT NULL,
  `stripe_api_key_test` text DEFAULT NULL,
  `stripe_api_key_production` text DEFAULT NULL,
  `stripe_webhook_secret_test` text DEFAULT NULL,
  `stripe_webhook_secret_production` text DEFAULT NULL,
  `base_price` decimal(10,2) NOT NULL DEFAULT 59.99,
  `additional_student_price` decimal(10,2) NOT NULL DEFAULT 3.50,
  `trial_days_bn` int(11) NOT NULL DEFAULT 7,
  `trial_days_bt` int(11) NOT NULL DEFAULT 7,
  `trial_days_ba` int(11) NOT NULL DEFAULT 7,
  `trial_days_vc` int(11) NOT NULL DEFAULT 7,
  `cache_interval` varchar(50) NOT NULL DEFAULT '5 MINUTES'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estrutura para tabela `songs`
--

CREATE TABLE `songs` (
  `id` int(11) NOT NULL,
  `name` varchar(255) DEFAULT NULL COMMENT 'song name',
  `extension` varchar(20) NOT NULL DEFAULT 'mp3',
  `source` varchar(255) DEFAULT NULL,
  `lyric_type` varchar(50) DEFAULT NULL,
  `lyric` longtext DEFAULT NULL,
  `timestamp` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Estrutura para tabela `sound`
--

CREATE TABLE `sound` (
  `id` int(2) NOT NULL,
  `name` varchar(255) DEFAULT NULL COMMENT 'level name',
  `grade` varchar(255) DEFAULT NULL COMMENT 'grade range',
  `source` varchar(255) DEFAULT NULL,
  `timestamp` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Estrutura para tabela `source`
--

CREATE TABLE `source` (
  `name` varchar(255) NOT NULL,
  `license` varchar(255) NOT NULL,
  `type` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Estrutura para tabela `special`
--

CREATE TABLE `special` (
  `id` int(2) NOT NULL,
  `name` varchar(255) DEFAULT NULL COMMENT 'level name',
  `lev` text DEFAULT NULL COMMENT 'level 1-6',
  `textRange` varchar(255) DEFAULT NULL COMMENT 'number of sentences for each section',
  `wordsNum` varchar(255) DEFAULT NULL COMMENT 'Number of words per section',
  `points` int(2) DEFAULT NULL,
  `timestamp` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Estrutura para tabela `students`
--

CREATE TABLE `students` (
  `id` int(11) NOT NULL,
  `id_external` varchar(255) DEFAULT NULL,
  `id_external_teacher` int(11) DEFAULT NULL,
  `id_avatar` int(11) DEFAULT 1,
  `id_teacher` int(11) NOT NULL,
  `id_group` int(11) DEFAULT NULL,
  `first_name` varchar(50) NOT NULL,
  `username` varchar(255) DEFAULT NULL,
  `last_name` varchar(50) DEFAULT NULL,
  `parent_email` varchar(50) DEFAULT NULL,
  `password` varchar(255) DEFAULT NULL,
  `password2` text DEFAULT NULL,
  `grade` int(11) DEFAULT NULL,
  `site` varchar(20) NOT NULL COMMENT 'BT,BA,VC,BN',
  `last_accessed` timestamp NULL DEFAULT NULL,
  `created` timestamp NOT NULL DEFAULT current_timestamp(),
  `student_test` int(11) NOT NULL DEFAULT 0,
  `table_from` varchar(50) DEFAULT NULL,
  `deleted` int(11) NOT NULL DEFAULT 0,
  `active` tinyint(1) DEFAULT 1,
  `fish_coins` int(11) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Estrutura para tabela `students_articles`
--

CREATE TABLE `students_articles` (
  `id` int(11) NOT NULL,
  `article_isbn` varchar(255) NOT NULL,
  `id_student` int(11) NOT NULL,
  `id_article` int(11) NOT NULL,
  `section` int(11) NOT NULL,
  `accessed_in` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Estrutura para tabela `students_badges`
--

CREATE TABLE `students_badges` (
  `id` int(11) NOT NULL,
  `id_student` int(11) NOT NULL,
  `id_badge` int(11) NOT NULL,
  `date_earned` timestamp NOT NULL DEFAULT current_timestamp(),
  `seen` tinyint(1) NOT NULL DEFAULT 0,
  `status` tinyint(1) NOT NULL DEFAULT 1
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Estrutura para tabela `students_deleted_backup`
--

CREATE TABLE `students_deleted_backup` (
  `id` int(11) NOT NULL,
  `id_external` varchar(255) DEFAULT NULL,
  `id_external_teacher` int(11) DEFAULT NULL,
  `id_avatar` int(11) DEFAULT 1,
  `id_teacher` int(11) NOT NULL,
  `id_group` int(11) DEFAULT NULL,
  `first_name` varchar(50) NOT NULL,
  `username` varchar(255) DEFAULT NULL,
  `last_name` varchar(50) DEFAULT NULL,
  `parent_email` varchar(50) DEFAULT NULL,
  `password` varchar(255) DEFAULT NULL,
  `password2` text DEFAULT NULL,
  `grade` int(11) DEFAULT NULL,
  `site` varchar(20) NOT NULL COMMENT 'BT,BA,VC,BN',
  `last_accessed` timestamp NULL DEFAULT NULL,
  `created` timestamp NOT NULL DEFAULT current_timestamp(),
  `student_test` int(11) NOT NULL DEFAULT 0,
  `table_from` varchar(50) DEFAULT NULL,
  `deleted` int(11) NOT NULL DEFAULT 0,
  `active` tinyint(1) DEFAULT 1
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Estrutura para tabela `students_goals`
--

CREATE TABLE `students_goals` (
  `id` int(11) NOT NULL,
  `id_student` int(11) NOT NULL,
  `id_teacher` int(11) NOT NULL,
  `goal` int(11) NOT NULL,
  `date_achieved` timestamp NOT NULL DEFAULT current_timestamp(),
  `seen` int(11) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Estrutura para tabela `students_logs`
--

CREATE TABLE `students_logs` (
  `id` int(11) NOT NULL,
  `id_student` int(11) NOT NULL,
  `id_teacher` int(11) NOT NULL,
  `id_article` int(11) DEFAULT NULL,
  `id_activity` int(11) DEFAULT NULL,
  `activity_type` varchar(255) DEFAULT NULL,
  `action` varchar(255) DEFAULT NULL,
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp(),
  `additional_information` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Estrutura para tabela `students_reading_log`
--

CREATE TABLE `students_reading_log` (
  `id` int(11) NOT NULL,
  `id_student` int(11) NOT NULL,
  `id_article` int(11) DEFAULT NULL,
  `article_isbn` varchar(255) NOT NULL,
  `total_time` int(11) DEFAULT 0,
  `started_in` timestamp NULL DEFAULT current_timestamp(),
  `end_in` timestamp NULL DEFAULT NULL,
  `quest_approved` tinyint(1) DEFAULT NULL,
  `quest_pending` tinyint(1) DEFAULT NULL,
  `last_access` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `array_log` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Estrutura para tabela `student_fish`
--

CREATE TABLE `student_fish` (
  `id` int(11) NOT NULL,
  `student_id` int(11) NOT NULL,
  `id_sprite` int(11) NOT NULL,
  `rarity` varchar(20) NOT NULL,
  `name` varchar(100) NOT NULL,
  `fed_time` bigint(20) NOT NULL DEFAULT 0,
  `play_time` bigint(20) NOT NULL DEFAULT 0,
  `size` int(11) NOT NULL,
  `position_x` int(11) NOT NULL,
  `position_y` int(11) NOT NULL,
  `feed_reward` int(11) NOT NULL,
  `play_reward` int(11) NOT NULL,
  `feed_count` int(11) NOT NULL DEFAULT 0,
  `play_count` int(11) NOT NULL DEFAULT 0,
  `created_at` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Estrutura para tabela `subcat1`
--

CREATE TABLE `subcat1` (
  `id` int(10) NOT NULL,
  `mainCat` int(3) DEFAULT NULL COMMENT 'main category-id mainCat',
  `isbn` varchar(255) DEFAULT NULL COMMENT 'isbn in article table',
  `name` varchar(255) DEFAULT NULL COMMENT '1st subcatagory',
  `icon` int(11) DEFAULT NULL COMMENT 'icon table id-thumbnail',
  `level_id` int(10) DEFAULT NULL,
  `order_me` int(3) DEFAULT NULL COMMENT 'arrange ASC by order_me ',
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Estrutura para tabela `subcat2`
--

CREATE TABLE `subcat2` (
  `id` int(10) NOT NULL,
  `subCat1` int(3) DEFAULT NULL COMMENT '1st subcategory-id subCat1',
  `isbn` varchar(255) DEFAULT NULL COMMENT 'isbn in article table',
  `name` varchar(255) DEFAULT NULL COMMENT '2nd subcatagory',
  `icon` int(11) DEFAULT NULL COMMENT 'icon table id-thumbnail',
  `level_id` int(11) DEFAULT NULL,
  `order_me` int(3) DEFAULT NULL COMMENT 'arrange ASC by order_me ',
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Estrutura para tabela `subcat3`
--

CREATE TABLE `subcat3` (
  `id` int(10) NOT NULL,
  `subCat2` int(3) DEFAULT NULL COMMENT '2nd subcategory-id subCat2',
  `isbn` varchar(255) DEFAULT NULL COMMENT 'isbn from articles table',
  `name` varchar(255) DEFAULT NULL COMMENT '3rd subcatagory',
  `icon` int(11) DEFAULT NULL COMMENT 'icon table id-thumbnail',
  `level_id` int(11) DEFAULT NULL,
  `order_me` int(3) DEFAULT NULL COMMENT 'arrange ASC by order_me ',
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Estrutura para tabela `subcat4`
--

CREATE TABLE `subcat4` (
  `id` int(10) NOT NULL,
  `subCat3` int(3) DEFAULT NULL COMMENT '3rd subcategory-id subCat3',
  `isbn` varchar(255) DEFAULT NULL COMMENT 'isbn from articles table',
  `name` varchar(255) DEFAULT NULL COMMENT '4th subcatagory',
  `icon` int(11) DEFAULT NULL COMMENT 'icon table id-thumbnail',
  `level_id` int(11) DEFAULT NULL,
  `order_me` int(3) DEFAULT NULL COMMENT 'arrange ASC by order_me ',
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Estrutura para tabela `subcat5`
--

CREATE TABLE `subcat5` (
  `id` int(10) NOT NULL,
  `subCat4` int(3) DEFAULT NULL COMMENT '4th subcategory-id subCat4',
  `isbn` varchar(255) DEFAULT NULL COMMENT 'isbn from articles table',
  `name` varchar(255) DEFAULT NULL COMMENT '5th subcatagory',
  `icon` int(11) DEFAULT NULL COMMENT 'icon table id-thumbnail',
  `level_id` int(11) DEFAULT NULL,
  `order_me` int(3) DEFAULT NULL COMMENT 'arrange ASC by order_me ',
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Estrutura para tabela `subcat6`
--

CREATE TABLE `subcat6` (
  `id` int(10) NOT NULL,
  `subCat5` int(3) DEFAULT NULL COMMENT '5th subcategory-id subCat5',
  `isbn` varchar(255) DEFAULT NULL COMMENT 'isbn from articles table',
  `name` varchar(255) DEFAULT NULL COMMENT '6th subcatagory',
  `icon` int(11) DEFAULT NULL COMMENT 'icon table id-thumbnail',
  `level_id` int(11) DEFAULT NULL,
  `order_me` int(3) DEFAULT NULL COMMENT 'arrange ASC by order_me ',
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Estrutura para tabela `subscriptions`
--

CREATE TABLE `subscriptions` (
  `id` int(11) NOT NULL,
  `id_teacher` int(11) NOT NULL,
  `id_order` varchar(255) NOT NULL,
  `seats` int(11) NOT NULL,
  `amount_total` int(11) NOT NULL,
  `amount_paid` int(11) NOT NULL,
  `status` varchar(255) NOT NULL,
  `created_at` timestamp NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `payment_method` varchar(255) DEFAULT NULL,
  `type` varchar(50) DEFAULT NULL,
  `claimed` int(11) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Estrutura para tabela `teachers`
--

CREATE TABLE `teachers` (
  `id` int(11) NOT NULL,
  `id_external` varchar(255) DEFAULT NULL,
  `first_name` varchar(50) NOT NULL,
  `last_name` varchar(50) NOT NULL,
  `email` varchar(50) DEFAULT NULL,
  `password` varchar(255) NOT NULL,
  `password2` text DEFAULT NULL,
  `site` varchar(20) NOT NULL COMMENT 'BT,BA,VC,BN',
  `table_from` varchar(50) DEFAULT NULL,
  `quiz_goal_passing` int(11) NOT NULL DEFAULT 70,
  `article_goal` int(11) NOT NULL DEFAULT 30,
  `last_accessed` timestamp NULL DEFAULT NULL,
  `last_accessed_ip` varchar(45) DEFAULT NULL,
  `created` timestamp NOT NULL DEFAULT current_timestamp(),
  `is_confirmed` int(11) NOT NULL DEFAULT 0,
  `confirmed_code` varchar(8) DEFAULT NULL,
  `enable_student_test_report` int(11) NOT NULL DEFAULT 1,
  `article_words_per_minute` varchar(255) NOT NULL DEFAULT '[220,260,300]',
  `access_level` varchar(255) NOT NULL DEFAULT '["Level 1","Level 2","Level 3"]',
  `terms_accepted_date` timestamp NULL DEFAULT NULL,
  `trial` tinyint(1) DEFAULT 1,
  `plan_date` timestamp NOT NULL DEFAULT current_timestamp(),
  `seats` int(11) NOT NULL DEFAULT 10,
  `has_base_plan` tinyint(1) NOT NULL DEFAULT 0,
  `super_paid_bn` tinyint(1) DEFAULT 0,
  `super_fullname` varchar(255) DEFAULT NULL,
  `super_email` varchar(255) DEFAULT NULL,
  `teacher_paid_bn` tinyint(1) DEFAULT 0,
  `plan_expiration_date` timestamp NULL DEFAULT NULL,
  `active` tinyint(1) DEFAULT 1
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Estrutura para tabela `teachers_achievements`
--

CREATE TABLE `teachers_achievements` (
  `id` int(11) NOT NULL,
  `id_teacher` int(11) NOT NULL,
  `id_achievement` int(11) NOT NULL,
  `date_earned` timestamp NOT NULL DEFAULT current_timestamp(),
  `seen` tinyint(1) NOT NULL DEFAULT 0,
  `status` tinyint(1) NOT NULL DEFAULT 1
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Estrutura para tabela `teachers_coupons`
--

CREATE TABLE `teachers_coupons` (
  `id` int(11) NOT NULL,
  `id_teacher` int(11) NOT NULL,
  `id_coupon` int(11) NOT NULL,
  `id_order` varchar(255) DEFAULT NULL,
  `used_date` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `original_price` decimal(10,2) DEFAULT NULL,
  `paid_price` decimal(10,2) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Estrutura para tabela `teacher_lists`
--

CREATE TABLE `teacher_lists` (
  `id` int(11) NOT NULL,
  `teacher_id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `position` int(11) NOT NULL DEFAULT 0,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Estrutura para tabela `teacher_list_access`
--

CREATE TABLE `teacher_list_access` (
  `id` int(11) NOT NULL,
  `list_id` int(11) NOT NULL,
  `entity_type` enum('student','group') NOT NULL,
  `entity_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Estrutura para tabela `teacher_list_articles`
--

CREATE TABLE `teacher_list_articles` (
  `id` int(11) NOT NULL,
  `list_id` int(11) NOT NULL,
  `article_id` int(20) NOT NULL,
  `position` int(11) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Estrutura para tabela `templates`
--

CREATE TABLE `templates` (
  `id` int(11) NOT NULL,
  `subject` varchar(255) DEFAULT NULL,
  `content` longtext DEFAULT NULL,
  `is_trial_marketing` tinyint(1) DEFAULT 0,
  `discount_type` varchar(32) DEFAULT NULL,
  `discount_value` varchar(32) DEFAULT NULL,
  `expires_in_days` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estrutura para tabela `uploads`
--

CREATE TABLE `uploads` (
  `id` int(11) NOT NULL,
  `title` varchar(255) NOT NULL,
  `filename` varchar(255) NOT NULL,
  `type` varchar(50) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `path` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Estrutura para tabela `users`
--

CREATE TABLE `users` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `email` varchar(50) NOT NULL,
  `password` varchar(255) NOT NULL,
  `permission` text DEFAULT NULL,
  `status` int(11) NOT NULL,
  `item_order` int(11) DEFAULT 0,
  `forbid_delete` int(11) NOT NULL DEFAULT 0,
  `token` varchar(255) DEFAULT NULL,
  `restrict_articles` int(11) NOT NULL DEFAULT 0,
  `restrict_articles_json` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Estrutura para tabela `users_bn`
--

CREATE TABLE `users_bn` (
  `id` int(11) NOT NULL,
  `firstname` varchar(150) DEFAULT NULL,
  `lastname` varchar(150) DEFAULT NULL,
  `email` varchar(250) NOT NULL,
  `username` varchar(250) DEFAULT NULL,
  `password` text NOT NULL,
  `role` varchar(50) NOT NULL DEFAULT 'Admin' COMMENT 'Admin/Reviewer',
  `created_at` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Estrutura para tabela `videos`
--

CREATE TABLE `videos` (
  `id` int(2) NOT NULL,
  `name` varchar(255) DEFAULT NULL COMMENT 'level name',
  `grade` varchar(255) DEFAULT NULL COMMENT 'grade range',
  `extension` varchar(20) NOT NULL DEFAULT 'mp4',
  `source` varchar(255) DEFAULT NULL,
  `timestamp` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Estrutura para tabela `word_images`
--

CREATE TABLE `word_images` (
  `id` int(11) NOT NULL,
  `WordID` int(11) NOT NULL,
  `img` varchar(255) NOT NULL,
  `description` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Estrutura para tabela `wp_word`
--

CREATE TABLE `wp_word` (
  `WordID` int(10) NOT NULL,
  `Word` varchar(100) DEFAULT NULL,
  `Syllable` varchar(30) DEFAULT NULL,
  `LessonID` int(10) DEFAULT NULL,
  `WordType` varchar(50) DEFAULT NULL,
  `image` varchar(100) DEFAULT NULL,
  `Sentence` varchar(255) DEFAULT NULL,
  `Sentence2` varchar(150) DEFAULT NULL,
  `Definition` varchar(250) DEFAULT NULL,
  `Syn1` varchar(210) DEFAULT NULL,
  `Ant` varchar(210) DEFAULT NULL,
  `PartSpeech` varchar(50) DEFAULT NULL,
  `Grade` int(10) DEFAULT NULL,
  `swf` int(1) NOT NULL DEFAULT 1,
  `hint` char(2) NOT NULL DEFAULT '0',
  `BeeLevel` int(1) NOT NULL DEFAULT 0,
  `BeeRank` int(1) NOT NULL DEFAULT 0,
  `Vocab` int(1) NOT NULL DEFAULT 0,
  `VocabLevel` int(1) NOT NULL DEFAULT 0,
  `VocabLevel2` int(2) NOT NULL DEFAULT 0,
  `VocabLesson` int(2) NOT NULL DEFAULT 0,
  `NewBee` char(2) NOT NULL DEFAULT '0',
  `TTS` int(3) NOT NULL DEFAULT 0,
  `SAT` tinyint(1) NOT NULL DEFAULT 0,
  `orderme` int(3) NOT NULL DEFAULT 0,
  `book` int(2) NOT NULL DEFAULT 0,
  `bank` int(2) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Índices para tabelas despejadas
--

--
-- Índices de tabela `achievements`
--
ALTER TABLE `achievements`
  ADD PRIMARY KEY (`id`);

--
-- Índices de tabela `activity_log`
--
ALTER TABLE `activity_log`
  ADD PRIMARY KEY (`id`),
  ADD KEY `subject` (`subject_type`,`subject_id`),
  ADD KEY `user` (`user_type`,`user_id`),
  ADD KEY `activity_log_log_name_index` (`log_name`),
  ADD KEY `idx_activity_log_user_subject_log` (`user_id`,`subject_type`,`log_name`);

--
-- Índices de tabela `animmation`
--
ALTER TABLE `animmation`
  ADD PRIMARY KEY (`id`);

--
-- Índices de tabela `articles`
--
ALTER TABLE `articles`
  ADD PRIMARY KEY (`id`),
  ADD KEY `isbn` (`isbn`),
  ADD KEY `idx_articles_image1` (`image1`),
  ADD KEY `idx_articles_image2` (`image2`),
  ADD KEY `idx_articles_image3` (`image3`),
  ADD KEY `idx_articles_image4` (`image4`),
  ADD KEY `idx_articles_image5` (`image5`),
  ADD KEY `idx_articles_image6` (`image6`),
  ADD KEY `idx_articles_image7` (`image7`),
  ADD KEY `idx_articles_image8` (`image8`),
  ADD KEY `idx_articles_image9` (`image9`),
  ADD KEY `idx_articles_image10` (`image10`),
  ADD KEY `idx_articles_image11` (`image11`),
  ADD KEY `idx_articles_image12` (`image12`),
  ADD KEY `idx_articles_video` (`video`),
  ADD KEY `idx_articles_group` (`id`,`isbn`),
  ADD KEY `idx_articles_id` (`id`),
  ADD KEY `idx_articles_active` (`id`,`active`),
  ADD KEY `idx_articles_active_level` (`active`,`level`),
  ADD KEY `idx_articles_level` (`level`),
  ADD KEY `idx_articles_timestamp_active` (`timestamp`,`active`),
  ADD KEY `idx_articles_active_level_isbn` (`active`,`level`,`isbn`,`id`);

--
-- Índices de tabela `articles_del`
--
ALTER TABLE `articles_del`
  ADD PRIMARY KEY (`id`),
  ADD KEY `isbn` (`isbn`),
  ADD KEY `isbn_2` (`isbn`);

--
-- Índices de tabela `article_history`
--
ALTER TABLE `article_history`
  ADD PRIMARY KEY (`history_id`),
  ADD KEY `idx_article` (`article_id`),
  ADD KEY `idx_user` (`user_id`);

--
-- Índices de tabela `article_history_payments`
--
ALTER TABLE `article_history_payments`
  ADD PRIMARY KEY (`article_id`,`user_id`),
  ADD KEY `user_id` (`user_id`);

--
-- Índices de tabela `avatars`
--
ALTER TABLE `avatars`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_avatars_status_order_goal` (`status`,`item_order`,`goal`);

--
-- Índices de tabela `badges`
--
ALTER TABLE `badges`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_badges_status` (`status`),
  ADD KEY `idx_badges_status_item_order` (`status`,`item_order`);

--
-- Índices de tabela `badwords`
--
ALTER TABLE `badwords`
  ADD PRIMARY KEY (`id`);

--
-- Índices de tabela `battles`
--
ALTER TABLE `battles`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_battles_status` (`status`),
  ADD KEY `idx_battles_id_article` (`id_article`),
  ADD KEY `idx_battles_status_article` (`status`,`id_article`);

--
-- Índices de tabela `battle_options`
--
ALTER TABLE `battle_options`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_battle_options_id_battle` (`id_battle`);

--
-- Índices de tabela `battle_votes`
--
ALTER TABLE `battle_votes`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_battle_votes_id_student` (`id_student`),
  ADD KEY `idx_battle_votes_id_battle` (`id_battle`),
  ADD KEY `idx_battle_votes_student_battle` (`id_student`,`id_battle`),
  ADD KEY `idx_battle_votes_id_option` (`id_option`);

--
-- Índices de tabela `booklists`
--
ALTER TABLE `booklists`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_booklists_isbn` (`isbn`);

--
-- Índices de tabela `booklists_del`
--
ALTER TABLE `booklists_del`
  ADD PRIMARY KEY (`id`);

--
-- Índices de tabela `bookquiz`
--
ALTER TABLE `bookquiz`
  ADD PRIMARY KEY (`id`),
  ADD KEY `isbn` (`isbn`);

--
-- Índices de tabela `bookquiz_del`
--
ALTER TABLE `bookquiz_del`
  ADD PRIMARY KEY (`id`),
  ADD KEY `isbn` (`isbn`);

--
-- Índices de tabela `clever_tokens`
--
ALTER TABLE `clever_tokens`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_clever_tokens_code` (`code`);

--
-- Índices de tabela `coupons`
--
ALTER TABLE `coupons`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `code` (`code`),
  ADD KEY `idx_coupons_applicable_site` (`applicable_site`),
  ADD KEY `idx_coupons_site_automatic` (`applicable_site`,`automatic`),
  ADD KEY `idx_coupons_site_automatic_status` (`applicable_site`,`automatic`,`status`),
  ADD KEY `idx_coupons_full_filter` (`applicable_site`,`automatic`,`status`,`expiry_date`);

--
-- Índices de tabela `coupon_reservations`
--
ALTER TABLE `coupon_reservations`
  ADD PRIMARY KEY (`id_coupon`,`id_teacher`);

--
-- Índices de tabela `customs_achievements`
--
ALTER TABLE `customs_achievements`
  ADD PRIMARY KEY (`id`);

--
-- Índices de tabela `deleted_data`
--
ALTER TABLE `deleted_data`
  ADD PRIMARY KEY (`id`);

--
-- Índices de tabela `fish_templates`
--
ALTER TABLE `fish_templates`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `id_sprite` (`id_sprite`);

--
-- Índices de tabela `funfacts`
--
ALTER TABLE `funfacts`
  ADD PRIMARY KEY (`id`);

--
-- Índices de tabela `groups`
--
ALTER TABLE `groups`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_groups_id` (`id`),
  ADD KEY `idx_groups_access_level` (`access_level`);

--
-- Índices de tabela `groups_students`
--
ALTER TABLE `groups_students`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_groups_students_student` (`id_student`),
  ADD KEY `idx_groups_students_group` (`id_group`);

--
-- Índices de tabela `icons`
--
ALTER TABLE `icons`
  ADD PRIMARY KEY (`id`);

--
-- Índices de tabela `images`
--
ALTER TABLE `images`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_images_id` (`id`);

--
-- Índices de tabela `level`
--
ALTER TABLE `level`
  ADD PRIMARY KEY (`id`);

--
-- Índices de tabela `log_cron`
--
ALTER TABLE `log_cron`
  ADD PRIMARY KEY (`id`);

--
-- Índices de tabela `log_cron_unsubscribe`
--
ALTER TABLE `log_cron_unsubscribe`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `unique_unsubscribe` (`teacher_id`,`notification_type`);

--
-- Índices de tabela `maincat`
--
ALTER TABLE `maincat`
  ADD PRIMARY KEY (`id`),
  ADD KEY `level_id` (`level_id`),
  ADD KEY `idx_maincat_id` (`id`),
  ADD KEY `idx_maincat_icon` (`icon`),
  ADD KEY `idx_maincat_level_id` (`level_id`),
  ADD KEY `idx_maincat_level_order` (`level_id`,`order_me`);

--
-- Índices de tabela `modules`
--
ALTER TABLE `modules`
  ADD PRIMARY KEY (`id`);

--
-- Índices de tabela `modules_files`
--
ALTER TABLE `modules_files`
  ADD PRIMARY KEY (`id`);

--
-- Índices de tabela `needwords`
--
ALTER TABLE `needwords`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `Word` (`Word`);

--
-- Índices de tabela `newwords`
--
ALTER TABLE `newwords`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `Word` (`Word`);

--
-- Índices de tabela `pages`
--
ALTER TABLE `pages`
  ADD PRIMARY KEY (`id`);

--
-- Índices de tabela `pdf`
--
ALTER TABLE `pdf`
  ADD PRIMARY KEY (`id`);

--
-- Índices de tabela `poems`
--
ALTER TABLE `poems`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_poems_isbn` (`isbn`);

--
-- Índices de tabela `poemtype`
--
ALTER TABLE `poemtype`
  ADD PRIMARY KEY (`id`);

--
-- Índices de tabela `polls`
--
ALTER TABLE `polls`
  ADD PRIMARY KEY (`id`);

--
-- Índices de tabela `polls_options`
--
ALTER TABLE `polls_options`
  ADD PRIMARY KEY (`id`),
  ADD KEY `id_poll` (`id_poll`);

--
-- Índices de tabela `polls_options_suggestions`
--
ALTER TABLE `polls_options_suggestions`
  ADD PRIMARY KEY (`id`);

--
-- Índices de tabela `polls_records`
--
ALTER TABLE `polls_records`
  ADD PRIMARY KEY (`id`),
  ADD KEY `id_option` (`id_option`);

--
-- Índices de tabela `posts`
--
ALTER TABLE `posts`
  ADD PRIMARY KEY (`id`);

--
-- Índices de tabela `reportcard`
--
ALTER TABLE `reportcard`
  ADD PRIMARY KEY (`id`),
  ADD KEY `MemberID` (`id_student`),
  ADD KEY `teacherID` (`id_teacher`),
  ADD KEY `ListId` (`id_article`),
  ADD KEY `isbn` (`isbn`),
  ADD KEY `modNum` (`id_module`);

--
-- Índices de tabela `report_cache`
--
ALTER TABLE `report_cache`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_logname_usertype_userid_updatedat` (`log_name`,`user_type`,`user_id`,`updated_at`),
  ADD KEY `idx_usertype_userid` (`user_type`,`user_id`),
  ADD KEY `idx_updated_at` (`updated_at`);

--
-- Índices de tabela `report_settings`
--
ALTER TABLE `report_settings`
  ADD PRIMARY KEY (`id`);

--
-- Índices de tabela `reviewer_article`
--
ALTER TABLE `reviewer_article`
  ADD PRIMARY KEY (`id`);

--
-- Índices de tabela `scripts`
--
ALTER TABLE `scripts`
  ADD PRIMARY KEY (`id`);

--
-- Índices de tabela `sections`
--
ALTER TABLE `sections`
  ADD PRIMARY KEY (`id`);

--
-- Índices de tabela `sections_group`
--
ALTER TABLE `sections_group`
  ADD PRIMARY KEY (`id`);

--
-- Índices de tabela `sections_group_items`
--
ALTER TABLE `sections_group_items`
  ADD PRIMARY KEY (`id`);

--
-- Índices de tabela `settings`
--
ALTER TABLE `settings`
  ADD PRIMARY KEY (`id`);

--
-- Índices de tabela `songs`
--
ALTER TABLE `songs`
  ADD PRIMARY KEY (`id`);

--
-- Índices de tabela `sound`
--
ALTER TABLE `sound`
  ADD PRIMARY KEY (`id`);

--
-- Índices de tabela `special`
--
ALTER TABLE `special`
  ADD PRIMARY KEY (`id`);

--
-- Índices de tabela `students`
--
ALTER TABLE `students`
  ADD PRIMARY KEY (`id`),
  ADD KEY `id_teacher` (`id_teacher`),
  ADD KEY `id_avatar` (`id_avatar`),
  ADD KEY `id_external_teacher` (`id_external_teacher`),
  ADD KEY `id_external` (`id_external`),
  ADD KEY `idx_students_id` (`id`),
  ADD KEY `idx_students_id_deleted` (`id`,`deleted`),
  ADD KEY `idx_students_id_teacher` (`id_teacher`),
  ADD KEY `idx_students_teacher_deleted_created` (`id_teacher`,`deleted`,`created`),
  ADD KEY `idx_students_site_table_from` (`site`,`table_from`),
  ADD KEY `idx_students_username` (`username`),
  ADD KEY `idx_students_username_deleted` (`username`,`deleted`),
  ADD KEY `idx_students_username_password` (`username`,`password`),
  ADD KEY `idx_students_user_pass_test` (`username`,`password`,`student_test`),
  ADD KEY `idx_students_deleted` (`deleted`,`id`);

--
-- Índices de tabela `students_articles`
--
ALTER TABLE `students_articles`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_students_articles_filter` (`id_student`,`id_article`,`article_isbn`),
  ADD KEY `idx_students_articles_filter_section` (`id_student`,`id_article`,`article_isbn`,`section`);

--
-- Índices de tabela `students_badges`
--
ALTER TABLE `students_badges`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_students_badges_id_student` (`id_student`),
  ADD KEY `idx_students_badges_id_badge` (`id_badge`);

--
-- Índices de tabela `students_deleted_backup`
--
ALTER TABLE `students_deleted_backup`
  ADD PRIMARY KEY (`id`),
  ADD KEY `id_teacher` (`id_teacher`),
  ADD KEY `id_avatar` (`id_avatar`),
  ADD KEY `id_external_teacher` (`id_external_teacher`),
  ADD KEY `id_external` (`id_external`),
  ADD KEY `idx_students_id` (`id`),
  ADD KEY `idx_students_id_deleted` (`id`,`deleted`),
  ADD KEY `idx_students_id_teacher` (`id_teacher`),
  ADD KEY `idx_students_teacher_deleted` (`id_teacher`,`deleted`),
  ADD KEY `idx_students_teacher_deleted_created` (`id_teacher`,`deleted`,`created`),
  ADD KEY `idx_students_site_table_from` (`site`,`table_from`),
  ADD KEY `idx_students_username` (`username`),
  ADD KEY `idx_students_username_deleted` (`username`,`deleted`),
  ADD KEY `idx_students_username_password` (`username`,`password`),
  ADD KEY `idx_students_user_pass_test` (`username`,`password`,`student_test`);

--
-- Índices de tabela `students_goals`
--
ALTER TABLE `students_goals`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_students_goals_id_student` (`id_student`),
  ADD KEY `idx_students_goals_student_date` (`id_student`,`date_achieved`);

--
-- Índices de tabela `students_logs`
--
ALTER TABLE `students_logs`
  ADD PRIMARY KEY (`id`),
  ADD KEY `search` (`id_student`,`timestamp`,`activity_type`),
  ADD KEY `idx_students_logs_teacher` (`id_teacher`),
  ADD KEY `idx_students_logs_student` (`id_student`),
  ADD KEY `idx_students_logs_composite` (`id_student`,`id_teacher`,`id_article`);

--
-- Índices de tabela `students_reading_log`
--
ALTER TABLE `students_reading_log`
  ADD PRIMARY KEY (`id`),
  ADD KEY `id_student` (`id_student`),
  ADD KEY `id_article` (`id_article`),
  ADD KEY `article_isbn` (`article_isbn`),
  ADD KEY `search` (`id_student`,`started_in`,`end_in`,`last_access`),
  ADD KEY `idx_students_reading_log_student_end` (`id_student`,`end_in`),
  ADD KEY `idx_students_reading_log_compound` (`id_student`,`end_in`,`id_article`),
  ADD KEY `idx_srl_student_end_access` (`id_student`,`end_in`,`last_access`),
  ADD KEY `idx_srl_student_end` (`id_student`,`end_in`),
  ADD KEY `idx_srl_id_article` (`id_article`),
  ADD KEY `idx_students_reading_log_opt` (`id_student`,`end_in`,`last_access`),
  ADD KEY `idx_students_reading_log_dates` (`started_in`,`end_in`,`last_access`,`id_student`);

--
-- Índices de tabela `student_fish`
--
ALTER TABLE `student_fish`
  ADD PRIMARY KEY (`id`),
  ADD KEY `student_id` (`student_id`),
  ADD KEY `id_sprite` (`id_sprite`);

--
-- Índices de tabela `subcat1`
--
ALTER TABLE `subcat1`
  ADD PRIMARY KEY (`id`),
  ADD KEY `mainCat` (`mainCat`),
  ADD KEY `idx_subcat1_mainCat` (`mainCat`),
  ADD KEY `idx_subcat1_isbn` (`isbn`),
  ADD KEY `idx_subcat1_icon` (`icon`),
  ADD KEY `idx_subcat1_opt` (`mainCat`,`level_id`,`order_me`),
  ADD KEY `idx_subcat1_isbn_maincat` (`isbn`,`mainCat`);

--
-- Índices de tabela `subcat2`
--
ALTER TABLE `subcat2`
  ADD PRIMARY KEY (`id`),
  ADD KEY `subCat1` (`subCat1`),
  ADD KEY `idx_subcat2_subCat1` (`subCat1`),
  ADD KEY `idx_subcat2_isbn` (`isbn`),
  ADD KEY `idx_subcat2_icon` (`icon`),
  ADD KEY `idx_subcat2_opt` (`subCat1`,`level_id`,`order_me`),
  ADD KEY `idx_subcat2_isbn_cat1` (`isbn`,`subCat1`);

--
-- Índices de tabela `subcat3`
--
ALTER TABLE `subcat3`
  ADD PRIMARY KEY (`id`),
  ADD KEY `subCat1` (`subCat2`,`isbn`),
  ADD KEY `idx_subcat3_subCat2` (`subCat2`),
  ADD KEY `idx_subcat3_isbn` (`isbn`),
  ADD KEY `idx_subcat3_icon` (`icon`),
  ADD KEY `idx_subcat3_opt` (`subCat2`,`level_id`,`order_me`),
  ADD KEY `idx_subcat3_isbn_cat2` (`isbn`,`subCat2`);

--
-- Índices de tabela `subcat4`
--
ALTER TABLE `subcat4`
  ADD PRIMARY KEY (`id`),
  ADD KEY `subCat1` (`subCat3`,`isbn`),
  ADD KEY `idx_subcat4_subCat3` (`subCat3`),
  ADD KEY `idx_subcat4_isbn` (`isbn`),
  ADD KEY `idx_subcat4_icon` (`icon`),
  ADD KEY `idx_subcat4_opt` (`subCat3`,`level_id`,`order_me`),
  ADD KEY `idx_subcat4_isbn_cat3` (`isbn`,`subCat3`);

--
-- Índices de tabela `subcat5`
--
ALTER TABLE `subcat5`
  ADD PRIMARY KEY (`id`),
  ADD KEY `subCat1` (`subCat4`,`isbn`),
  ADD KEY `idx_subcat5_subCat4` (`subCat4`),
  ADD KEY `idx_subcat5_isbn` (`isbn`),
  ADD KEY `idx_subcat5_icon` (`icon`),
  ADD KEY `idx_subcat5_opt` (`subCat4`,`level_id`,`order_me`),
  ADD KEY `idx_subcat5_isbn_cat4` (`isbn`,`subCat4`);

--
-- Índices de tabela `subcat6`
--
ALTER TABLE `subcat6`
  ADD PRIMARY KEY (`id`),
  ADD KEY `subCat1` (`subCat5`,`isbn`),
  ADD KEY `idx_subcat6_subCat5` (`subCat5`),
  ADD KEY `idx_subcat6_isbn` (`isbn`),
  ADD KEY `idx_subcat6_icon` (`icon`),
  ADD KEY `idx_subcat6_opt` (`subCat5`,`level_id`,`order_me`),
  ADD KEY `idx_subcat6_isbn_cat5` (`isbn`,`subCat5`);

--
-- Índices de tabela `subscriptions`
--
ALTER TABLE `subscriptions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_subscriptions_status` (`status`),
  ADD KEY `idx_subscriptions_status_amount` (`status`,`amount_paid`);

--
-- Índices de tabela `teachers`
--
ALTER TABLE `teachers`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_teachers_id` (`id`),
  ADD KEY `idx_teachers_access_level` (`access_level`),
  ADD KEY `idx_teachers_created` (`created`),
  ADD KEY `idx_teachers_last_accessed` (`last_accessed`),
  ADD KEY `idx_teachers_last_created` (`last_accessed`,`created`),
  ADD KEY `idx_teachers_email` (`email`),
  ADD KEY `idx_teachers_email_site` (`email`,`site`),
  ADD KEY `idx_teachers_email_site_table` (`email`,`site`,`table_from`);

--
-- Índices de tabela `teachers_achievements`
--
ALTER TABLE `teachers_achievements`
  ADD PRIMARY KEY (`id`);

--
-- Índices de tabela `teachers_coupons`
--
ALTER TABLE `teachers_coupons`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `unique_order_id` (`id_order`),
  ADD KEY `idx_teachers_coupons_id_coupon` (`id_coupon`);

--
-- Índices de tabela `teacher_lists`
--
ALTER TABLE `teacher_lists`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_teacher_lists_teacher` (`teacher_id`);

--
-- Índices de tabela `teacher_list_access`
--
ALTER TABLE `teacher_list_access`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_teacher_list_access_entity` (`entity_type`,`entity_id`,`list_id`);

--
-- Índices de tabela `teacher_list_articles`
--
ALTER TABLE `teacher_list_articles`
  ADD PRIMARY KEY (`id`);

--
-- Índices de tabela `templates`
--
ALTER TABLE `templates`
  ADD PRIMARY KEY (`id`);

--
-- Índices de tabela `uploads`
--
ALTER TABLE `uploads`
  ADD PRIMARY KEY (`id`);

--
-- Índices de tabela `users`
--
ALTER TABLE `users`
  ADD PRIMARY KEY (`id`);

--
-- Índices de tabela `users_bn`
--
ALTER TABLE `users_bn`
  ADD PRIMARY KEY (`id`);

--
-- Índices de tabela `videos`
--
ALTER TABLE `videos`
  ADD PRIMARY KEY (`id`);

--
-- Índices de tabela `word_images`
--
ALTER TABLE `word_images`
  ADD PRIMARY KEY (`id`);

--
-- Índices de tabela `wp_word`
--
ALTER TABLE `wp_word`
  ADD PRIMARY KEY (`WordID`),
  ADD UNIQUE KEY `Word_2` (`Word`),
  ADD KEY `LessonID` (`LessonID`),
  ADD KEY `Word` (`Word`);

--
-- AUTO_INCREMENT para tabelas despejadas
--

--
-- AUTO_INCREMENT de tabela `achievements`
--
ALTER TABLE `achievements`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `activity_log`
--
ALTER TABLE `activity_log`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `animmation`
--
ALTER TABLE `animmation`
  MODIFY `id` int(2) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `articles`
--
ALTER TABLE `articles`
  MODIFY `id` int(20) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `articles_del`
--
ALTER TABLE `articles_del`
  MODIFY `id` int(20) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `article_history`
--
ALTER TABLE `article_history`
  MODIFY `history_id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `avatars`
--
ALTER TABLE `avatars`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `badges`
--
ALTER TABLE `badges`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `badwords`
--
ALTER TABLE `badwords`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `battles`
--
ALTER TABLE `battles`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `battle_options`
--
ALTER TABLE `battle_options`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `battle_votes`
--
ALTER TABLE `battle_votes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `booklists`
--
ALTER TABLE `booklists`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `booklists_del`
--
ALTER TABLE `booklists_del`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `bookquiz`
--
ALTER TABLE `bookquiz`
  MODIFY `id` int(12) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `bookquiz_del`
--
ALTER TABLE `bookquiz_del`
  MODIFY `id` int(12) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `clever_tokens`
--
ALTER TABLE `clever_tokens`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `coupons`
--
ALTER TABLE `coupons`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `customs_achievements`
--
ALTER TABLE `customs_achievements`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `deleted_data`
--
ALTER TABLE `deleted_data`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `fish_templates`
--
ALTER TABLE `fish_templates`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `funfacts`
--
ALTER TABLE `funfacts`
  MODIFY `id` int(2) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `groups`
--
ALTER TABLE `groups`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `groups_students`
--
ALTER TABLE `groups_students`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `icons`
--
ALTER TABLE `icons`
  MODIFY `id` int(2) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `images`
--
ALTER TABLE `images`
  MODIFY `id` int(2) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `level`
--
ALTER TABLE `level`
  MODIFY `id` int(2) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `log_cron`
--
ALTER TABLE `log_cron`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `log_cron_unsubscribe`
--
ALTER TABLE `log_cron_unsubscribe`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `maincat`
--
ALTER TABLE `maincat`
  MODIFY `id` int(10) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `modules`
--
ALTER TABLE `modules`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `modules_files`
--
ALTER TABLE `modules_files`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `needwords`
--
ALTER TABLE `needwords`
  MODIFY `id` int(10) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `newwords`
--
ALTER TABLE `newwords`
  MODIFY `id` int(10) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `pages`
--
ALTER TABLE `pages`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `pdf`
--
ALTER TABLE `pdf`
  MODIFY `id` int(2) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `poems`
--
ALTER TABLE `poems`
  MODIFY `id` int(2) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `poemtype`
--
ALTER TABLE `poemtype`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `polls`
--
ALTER TABLE `polls`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `polls_options`
--
ALTER TABLE `polls_options`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `polls_options_suggestions`
--
ALTER TABLE `polls_options_suggestions`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `polls_records`
--
ALTER TABLE `polls_records`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `posts`
--
ALTER TABLE `posts`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `reportcard`
--
ALTER TABLE `reportcard`
  MODIFY `id` int(10) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `report_cache`
--
ALTER TABLE `report_cache`
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `report_settings`
--
ALTER TABLE `report_settings`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `reviewer_article`
--
ALTER TABLE `reviewer_article`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `scripts`
--
ALTER TABLE `scripts`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `sections`
--
ALTER TABLE `sections`
  MODIFY `id` int(20) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `sections_group`
--
ALTER TABLE `sections_group`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `sections_group_items`
--
ALTER TABLE `sections_group_items`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `settings`
--
ALTER TABLE `settings`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `songs`
--
ALTER TABLE `songs`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `sound`
--
ALTER TABLE `sound`
  MODIFY `id` int(2) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `special`
--
ALTER TABLE `special`
  MODIFY `id` int(2) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `students`
--
ALTER TABLE `students`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `students_articles`
--
ALTER TABLE `students_articles`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `students_badges`
--
ALTER TABLE `students_badges`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `students_deleted_backup`
--
ALTER TABLE `students_deleted_backup`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `students_goals`
--
ALTER TABLE `students_goals`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `students_logs`
--
ALTER TABLE `students_logs`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `students_reading_log`
--
ALTER TABLE `students_reading_log`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `student_fish`
--
ALTER TABLE `student_fish`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `subcat1`
--
ALTER TABLE `subcat1`
  MODIFY `id` int(10) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `subcat2`
--
ALTER TABLE `subcat2`
  MODIFY `id` int(10) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `subcat3`
--
ALTER TABLE `subcat3`
  MODIFY `id` int(10) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `subcat4`
--
ALTER TABLE `subcat4`
  MODIFY `id` int(10) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `subcat5`
--
ALTER TABLE `subcat5`
  MODIFY `id` int(10) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `subcat6`
--
ALTER TABLE `subcat6`
  MODIFY `id` int(10) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `subscriptions`
--
ALTER TABLE `subscriptions`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `teachers`
--
ALTER TABLE `teachers`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `teachers_achievements`
--
ALTER TABLE `teachers_achievements`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `teachers_coupons`
--
ALTER TABLE `teachers_coupons`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `teacher_lists`
--
ALTER TABLE `teacher_lists`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `teacher_list_access`
--
ALTER TABLE `teacher_list_access`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `teacher_list_articles`
--
ALTER TABLE `teacher_list_articles`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `templates`
--
ALTER TABLE `templates`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `uploads`
--
ALTER TABLE `uploads`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `users`
--
ALTER TABLE `users`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `users_bn`
--
ALTER TABLE `users_bn`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `videos`
--
ALTER TABLE `videos`
  MODIFY `id` int(2) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `word_images`
--
ALTER TABLE `word_images`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `wp_word`
--
ALTER TABLE `wp_word`
  MODIFY `WordID` int(10) NOT NULL AUTO_INCREMENT;
COMMIT;

/*!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 */;
