 -- MySQL Script generated by MySQL Workbench
--- ven 11 mar 2016 17:03:13 CET
+-- ven 10 mar 2017 15:47:03 CET
 -- Model: New Model    Version: 1.0
 -- MySQL Workbench Forward Engineering
 

DROP TABLE IF EXISTS `s4t-iotronic`.`reverse_cloud_services` ;

CREATE TABLE IF NOT EXISTS `s4t-iotronic`.`reverse_cloud_services` (
  `board_id` INT(8) NOT NULL,
  `service` VARCHAR(50) NOT NULL,
  `public_ip` VARCHAR(16) NOT NULL,
  `public_port` VARCHAR(5) NOT NULL,

ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8;


-- -----------------------------------------------------
-- Table `s4t-iotronic`.`mountpoints`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `s4t-iotronic`.`mountpoints` ;

CREATE TABLE IF NOT EXISTS `s4t-iotronic`.`mountpoints` (
  `src_board` VARCHAR(36) NOT NULL,
  `dst_board` VARCHAR(36) NOT NULL,
  `src_path` VARCHAR(45) NOT NULL,
  `dst_path` VARCHAR(45) NOT NULL,
  `status` VARCHAR(45) NOT NULL,
  PRIMARY KEY (`src_board`, `dst_board`, `src_path`, `dst_path`),
  INDEX `fk_mountpoints_board_codes1_idx` (`src_board` ASC),
  INDEX `fk_mountpoints_board_codes2_idx` (`dst_board` ASC),
  CONSTRAINT `fk_mountpoints_board_codes1`
    FOREIGN KEY (`src_board`)
    REFERENCES `s4t-iotronic`.`board_codes` (`code`)
    ON DELETE CASCADE
    ON UPDATE CASCADE,
  CONSTRAINT `fk_mountpoints_board_codes2`
    FOREIGN KEY (`dst_board`)
    REFERENCES `s4t-iotronic`.`board_codes` (`code`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION)
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8;

USE `s4t-iotronic` ;

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