Skip to content

bmarsilio/testeCodeIgniter

Repository files navigation

DUMP BD

-- MySQL Script generated by MySQL Workbench
-- Qua 18 Abr 2018 23:34:35 -03
-- Model: New Model    Version: 1.0
-- 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 testeCodeIgniterBd
-- -----------------------------------------------------
DROP SCHEMA IF EXISTS `testeCodeIgniterBd` ;

-- -----------------------------------------------------
-- Schema testeCodeIgniterBd
-- -----------------------------------------------------
CREATE SCHEMA IF NOT EXISTS `testeCodeIgniterBd` DEFAULT CHARACTER SET utf8 ;
USE `testeCodeIgniterBd` ;

-- -----------------------------------------------------
-- Table `testeCodeIgniterBd`.`categoria`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `testeCodeIgniterBd`.`categoria` ;

CREATE TABLE IF NOT EXISTS `testeCodeIgniterBd`.`categoria` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `descricao` VARCHAR(45) NOT NULL,
  PRIMARY KEY (`id`))
ENGINE = InnoDB;


-- -----------------------------------------------------
-- Table `testeCodeIgniterBd`.`produto`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `testeCodeIgniterBd`.`produto` ;

CREATE TABLE IF NOT EXISTS `testeCodeIgniterBd`.`produto` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `categoria_id` INT NOT NULL,
  `nome` VARCHAR(45) NOT NULL,
  `descricao` VARCHAR(45) NOT NULL,
  `valor` FLOAT NOT NULL,
  PRIMARY KEY (`id`),
  CONSTRAINT `fk_categoria_id`
    FOREIGN KEY (`categoria_id`)
    REFERENCES `testeCodeIgniterBd`.`categoria` (`id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION)
ENGINE = InnoDB;


SET SQL_MODE=@OLD_SQL_MODE;
SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages