uploading template files

This commit is contained in:
Rick van Lieshout
2018-02-12 14:47:28 +01:00
parent 995b47f324
commit 714bd6d962
30 changed files with 305 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
-- -----------------------------------------------------
-- Table `Template`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `Template` (
`id` INT NOT NULL AUTO_INCREMENT ,
`Title` VARCHAR(30) NOT NULL ,
PRIMARY KEY (`id`) )
ENGINE = InnoDB;
-- -----------------------------------------------------
-- Table `References`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `References` (
`url` VARCHAR(400) NOT NULL ,
`Templates_id` INT NOT NULL ,
PRIMARY KEY (`url`, `Templates_id`) ,
INDEX `fk_References_Template_idx` (`Templates_id` ASC) ,
CONSTRAINT `fk_References_Template`
FOREIGN KEY (`Template_id`)
REFERENCES `Template` (`id`)
ON DELETE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB;

View File

@@ -0,0 +1,4 @@
-- -----------------------------------------------------
-- Table `Template`
-- -----------------------------------------------------
INSERT INTO `Template` (`id`) VALUES ('1');