 -- MySQL Script generated by MySQL Workbench
--- Tue May  5 10:46:21 2015
+-- Tue May 12 22:15:11 2015
 -- Model: New Model    Version: 1.0
 -- MySQL Workbench Forward Engineering
 

  `email` VARCHAR(45) NULL,
  `address` VARCHAR(45) NULL,
  `memberSince` DATE NULL,
  `password` VARCHAR(45) NULL,
  `user_id` INT NULL,
  PRIMARY KEY (`idAccount`),
  INDEX `fk_country_idx` (`idCountry` ASC),

    ON UPDATE NO ACTION)
ENGINE = InnoDB;


-- -----------------------------------------------------
-- Table `moviewatch`.`AsianCatalog`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `moviewatch`.`AsianCatalog` ;

CREATE TABLE IF NOT EXISTS `moviewatch`.`AsianCatalog` (
  `idFilm` INT NOT NULL AUTO_INCREMENT,
  `name` VARCHAR(100) NULL,
  `genre` VARCHAR(45) NULL,
  `rating` FLOAT NULL,
  `description` TEXT NULL,
  `releaseDate` DATE NULL,
  `director` VARCHAR(200) NULL,
  `duration` INT NULL,
  `filepath` VARCHAR(200) NULL,
  `poster` VARCHAR(200) NULL DEFAULT 'no_poster.png',
  PRIMARY KEY (`idFilm`))
ENGINE = InnoDB;


-- -----------------------------------------------------
-- Table `moviewatch`.`EurupeanCatalog`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `moviewatch`.`EurupeanCatalog` ;

CREATE TABLE IF NOT EXISTS `moviewatch`.`EurupeanCatalog` (
  `idFilm` INT NOT NULL AUTO_INCREMENT,
  `name` VARCHAR(100) NULL,
  `genre` VARCHAR(45) NULL,
  `rating` FLOAT NULL,
  `description` TEXT NULL,
  `releaseDate` DATE NULL,
  `director` VARCHAR(200) NULL,
  `duration` INT NULL,
  `filepath` VARCHAR(200) NULL,
  `poster` VARCHAR(200) NULL DEFAULT 'no_poster.png',
  PRIMARY KEY (`idFilm`))
ENGINE = InnoDB;

SET SQL_MODE = '';
GRANT USAGE ON *.* TO appuser;
 DROP USER appuser;
