 -- -----------------------------------------------------
 DROP TABLE IF EXISTS `crawl`.`pages` ;
 
-CREATE TABLE IF NOT EXISTS `crawl`.`pages` (
-  `id` INT(11) NOT NULL AUTO_INCREMENT,
-  `runid` INT(11) NOT NULL,
-  `url` VARCHAR(2048) NOT NULL,
-  `status` INT(11) NULL DEFAULT NULL,
-  `title` VARCHAR(2048) NULL DEFAULT NULL,
-  PRIMARY KEY (`id`, `runid`),
-  INDEX `fk_pages_runs_idx` (`runid` ASC),
-  INDEX `idx_pages_url` (`url`(255) ASC),
-  INDEX `idx_pages_status` (`status` ASC),
+CREATE  TABLE IF NOT EXISTS `crawl`.`pages` (
+  `id` INT(11) NOT NULL AUTO_INCREMENT ,
+  `runid` INT(11) NOT NULL ,
+  `url` VARCHAR(2048) NOT NULL ,
+  `status` INT(11) NULL DEFAULT NULL ,
+  `title` VARCHAR(2048) NULL DEFAULT NULL ,
+  `text` MEDIUMTEXT NULL DEFAULT NULL ,
+  PRIMARY KEY (`id`, `runid`) ,
+  INDEX `fk_pages_runs_idx` (`runid` ASC) ,
+  INDEX `idx_pages_url` (`url`(255) ASC) ,
+  INDEX `idx_pages_status` (`status` ASC) ,
   CONSTRAINT `fk_pages_runs`
-    FOREIGN KEY (`runid`)
-    REFERENCES `crawl`.`runs` (`id`)
+    FOREIGN KEY (`runid` )
+    REFERENCES `crawl`.`runs` (`id` )
     ON DELETE NO ACTION
     ON UPDATE NO ACTION)
 ENGINE = InnoDB
-AUTO_INCREMENT = 89275
+AUTO_INCREMENT = 91023
 DEFAULT CHARACTER SET = utf8;
 
 

-- MySQL Workbench Forward Engineering

SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES';

-- -----------------------------------------------------
-- Schema mydb
-- -----------------------------------------------------
-- -----------------------------------------------------
-- Schema crawl
-- -----------------------------------------------------
DROP SCHEMA IF EXISTS `crawl` ;

-- -----------------------------------------------------
-- Schema crawl
-- -----------------------------------------------------
CREATE SCHEMA IF NOT EXISTS `crawl` DEFAULT CHARACTER SET latin1 ;
USE `crawl` ;


-- -----------------------------------------------------
DROP TABLE IF EXISTS `crawl`.`words` ;

CREATE  TABLE IF NOT EXISTS `crawl`.`words` (
  `id` INT(11) NOT NULL AUTO_INCREMENT ,
  `runid` INT(11) NULL DEFAULT NULL ,
  `word` VARCHAR(256) NULL DEFAULT NULL ,
  `occurrences` INT(11) NULL DEFAULT '0' ,
  PRIMARY KEY (`id`) ,
  UNIQUE INDEX `run_word_idx` (`runid` ASC, `word` ASC) ,
  INDEX `fk_words_runs_idx` (`runid` ASC) ,
  CONSTRAINT `fk_words_runs`
    FOREIGN KEY (`runid` )
    REFERENCES `crawl`.`runs` (`id` )
    ON DELETE NO ACTION
    ON UPDATE NO ACTION)
ENGINE = InnoDB
