mirror of
https://github.com/Mastermindzh/dotfiles.git
synced 2025-08-02 23:53:27 +02:00
uploading template files
This commit is contained in:
23
templates/SQL/MySQL/CREATE SCRIPT.sql
Normal file
23
templates/SQL/MySQL/CREATE SCRIPT.sql
Normal 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;
|
4
templates/SQL/MySQL/INSERT SCRIPT.sql
Normal file
4
templates/SQL/MySQL/INSERT SCRIPT.sql
Normal file
@@ -0,0 +1,4 @@
|
||||
-- -----------------------------------------------------
|
||||
-- Table `Template`
|
||||
-- -----------------------------------------------------
|
||||
INSERT INTO `Template` (`id`) VALUES ('1');
|
Reference in New Issue
Block a user