   `UPDATE_USER_ID` VARCHAR(32) NOT NULL,
   `UPDATE_TS` DATETIME NOT NULL,
   PRIMARY KEY (`GRE_UID`),
-  CONSTRAINT `fk_GROUP_EMPLOYEE_ASSOC_EMPLOYEES1`
+  CONSTRAINT `fk_GROUP_PARTY_ASSOC_PARTY1`
     FOREIGN KEY (`PTY_UID_FK`)
     REFERENCES `calordersdb`.`PARTY` (`PTY_UID`)
     ON DELETE NO ACTION
     ON UPDATE NO ACTION,
-  CONSTRAINT `fk_GROUP_EMPLOYEE_ASSOC_GROUPS1`
+  CONSTRAINT `fk_GROUP_PARTY_ASSOC_GROUPS1`
     FOREIGN KEY (`GRP_UID_FK`)
-    REFERENCES `calordersdb`.`GROUP` (`GRP_UID`)
+    REFERENCES `calordersdb`.`GROUPS` (`GRP_UID`)
     ON DELETE NO ACTION
     ON UPDATE NO ACTION)
 ENGINE = InnoDB

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);


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

ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8;

CREATE INDEX `fk_PARTY_CONTACT_PARTIES_idx` ON `calordersdb`.`CONTACT_INFO` (`PTY_UID_FK` ASC);

CREATE INDEX `fk_CONTACT_DEPARTMENT1_idx` ON `calordersdb`.`CONTACT_INFO` (`DEP_UID_FK` ASC);

CREATE INDEX `fk_EMC_TYPE_CD_idx` ON `calordersdb`.`CONTACT_INFO` (`EMC_TYPE_CD` ASC);


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