Updated database and sql model added support group and insupportgroup
This commit is contained in:
parent
af2986ff01
commit
fe896339d6
4 changed files with 71 additions and 0 deletions
Binary file not shown.
Before Width: | Height: | Size: 110 KiB After Width: | Height: | Size: 122 KiB |
|
@ -274,6 +274,42 @@
|
|||
INSERT IGNORE INTO `" . $cfg['db']['lib']['name'] ."`.`ticket_category` (`Name`) VALUES ('Hacking'),('Ingame-Bug'),('Website-Bug'),('Installation');
|
||||
|
||||
|
||||
-- -----------------------------------------------------
|
||||
-- Table `" . $cfg['db']['lib']['name'] ."`.`support_group`
|
||||
-- -----------------------------------------------------
|
||||
DROP TABLE IF EXISTS `" . $cfg['db']['lib']['name'] ."`.`support_group` ;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `" . $cfg['db']['lib']['name'] ."`.`support_group` (
|
||||
`SGroupId` INT(10) NOT NULL AUTO_INCREMENT ,
|
||||
`Name` VARCHAR(45) NOT NULL ,
|
||||
PRIMARY KEY (`SGroupId`) )
|
||||
ENGINE = InnoDB;
|
||||
|
||||
|
||||
-- -----------------------------------------------------
|
||||
-- Table `" . $cfg['db']['lib']['name'] ."`.`in_support_group`
|
||||
-- -----------------------------------------------------
|
||||
DROP TABLE IF EXISTS `" . $cfg['db']['lib']['name'] ."`.`in_support_group` ;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `" . $cfg['db']['lib']['name'] ."`.`in_support_group` (
|
||||
`User` INT(10) UNSIGNED NOT NULL ,
|
||||
`Group` INT(10) NOT NULL ,
|
||||
INDEX `fk_in_support_group_ticket_user1` (`User` ASC) ,
|
||||
INDEX `fk_in_support_group_support_group1` (`Group` ASC) ,
|
||||
CONSTRAINT `fk_in_support_group_ticket_user1`
|
||||
FOREIGN KEY (`User` )
|
||||
REFERENCES `" . $cfg['db']['lib']['name'] ."`.`ticket_user` (`TUserId` )
|
||||
ON DELETE NO ACTION
|
||||
ON UPDATE NO ACTION,
|
||||
CONSTRAINT `fk_in_support_group_support_group1`
|
||||
FOREIGN KEY (`Group` )
|
||||
REFERENCES `" . $cfg['db']['lib']['name'] ."`.`support_group` (`SGroupId` )
|
||||
ON DELETE NO ACTION
|
||||
ON UPDATE NO ACTION)
|
||||
ENGINE = InnoDB;
|
||||
|
||||
|
||||
|
||||
";
|
||||
$dbl->executeWithoutParams($sql);
|
||||
print "The Lib & Web database were correctly installed! <br />";
|
||||
|
|
|
@ -231,6 +231,41 @@ CREATE TABLE IF NOT EXISTS `mydb`.`ticket_log` (
|
|||
ENGINE = InnoDB;
|
||||
|
||||
|
||||
-- -----------------------------------------------------
|
||||
-- Table `mydb`.`support_group`
|
||||
-- -----------------------------------------------------
|
||||
DROP TABLE IF EXISTS `mydb`.`support_group` ;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `mydb`.`support_group` (
|
||||
`SGroupId` INT(10) NOT NULL AUTO_INCREMENT ,
|
||||
`Name` VARCHAR(45) NOT NULL ,
|
||||
PRIMARY KEY (`SGroupId`) )
|
||||
ENGINE = InnoDB;
|
||||
|
||||
|
||||
-- -----------------------------------------------------
|
||||
-- Table `mydb`.`in_support_group`
|
||||
-- -----------------------------------------------------
|
||||
DROP TABLE IF EXISTS `mydb`.`in_support_group` ;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `mydb`.`in_support_group` (
|
||||
`User` INT(10) UNSIGNED NOT NULL ,
|
||||
`Group` INT(10) NOT NULL ,
|
||||
INDEX `fk_in_support_group_ticket_user1` (`User` ASC) ,
|
||||
INDEX `fk_in_support_group_support_group1` (`Group` ASC) ,
|
||||
CONSTRAINT `fk_in_support_group_ticket_user1`
|
||||
FOREIGN KEY (`User` )
|
||||
REFERENCES `mydb`.`ticket_user` (`TUserId` )
|
||||
ON DELETE NO ACTION
|
||||
ON UPDATE NO ACTION,
|
||||
CONSTRAINT `fk_in_support_group_support_group1`
|
||||
FOREIGN KEY (`Group` )
|
||||
REFERENCES `mydb`.`support_group` (`SGroupId` )
|
||||
ON DELETE NO ACTION
|
||||
ON UPDATE NO ACTION)
|
||||
ENGINE = InnoDB;
|
||||
|
||||
|
||||
|
||||
SET SQL_MODE=@OLD_SQL_MODE;
|
||||
SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
|
||||
|
|
Binary file not shown.
Loading…
Reference in a new issue