 ENGINE = InnoDB
 DEFAULT CHARACTER SET = utf8;
 
-CREATE UNIQUE INDEX `GRP_UID_UNIQUE` ON `calordersdb`.`GROUP` (`GRP_UID` ASC);
-
-CREATE INDEX `fk_GROUPS_Company1_idx` ON `calordersdb`.`GROUP` (`DEP_UID_FK` ASC);
-
-CREATE INDEX `fk_GROUPS_GRP_TYPE_CD1_idx` ON `calordersdb`.`GROUP` (`GRP_TYPE_CD` ASC);
+CREATE UNIQUE INDEX `GRP_UID_UNIQUE` ON `calordersdb`.`GROUPS` (`GRP_UID` ASC);
+
+CREATE INDEX `fk_GROUPS_DEPARTMENT1_idx` ON `calordersdb`.`GROUPS` (`DEP_UID_FK` ASC);
+
+CREATE INDEX `fk_GROUPS_GRP_TYPE_CD1_idx` ON `calordersdb`.`GROUPS` (`GRP_TYPE_CD` ASC);
 
 
 -- -----------------------------------------------------

  PRIMARY KEY (`PRV_UID`),
  CONSTRAINT `fk_PRIVILEGES_GROUPS`
    FOREIGN KEY (`GRP_UID_FK`)
    REFERENCES `calordersdb`.`GROUP` (`GRP_UID`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION)
ENGINE = InnoDB;

    REFERENCES `calordersdb`.`EMC_TYPE_CD` (`CODE`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `fk_PARTY_CONTACT_PARTY`
    FOREIGN KEY (`PTY_UID_FK`)
    REFERENCES `calordersdb`.`PARTY` (`PTY_UID`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `fk_CONTACT_PARTY`
    FOREIGN KEY (`DEP_UID_FK`)
    REFERENCES `calordersdb`.`DEPARTMENT` (`DEP_UID`)
    ON DELETE NO ACTION
