From: Petr Pícha <ppicha@xxxxxxxxxxx>
Table issue_comment stores issue ID, commenter ID and date of
the comment addition. It does not store the comment text itself.
Additionally, the data stored in the issue_comment table are virtually
the same as in table issue_change, and the table is therefore obsolete.
Delete table issue_comment and add an attribute for storing a comment in
table issue_change. Thus it is possible to store either a comment added
to an issue without any changes to the issue's field values, or one or
more simultaneous changes of issue's field values with or without a
comment (as multiple issue-tracking tools allow for).
Signed-off-by: Petr Pícha <ppicha@xxxxxxxxxxx>
Signed-off-by: Wolfgang Mauerer <wolfgang.mauerer@xxxxxxxxxxxxxxxxx>
---
datamodel/codeface.mwb | Bin 61137 -> 60140 bytes
datamodel/codeface_schema.sql | 31 ++-----------------------------
2 files changed, 2 insertions(+), 29 deletions(-)
diff --git a/datamodel/codeface.mwb b/datamodel/codeface.mwb
index 06236d7..e7a4660 100644
Binary files a/datamodel/codeface.mwb and b/datamodel/codeface.mwb differ
diff --git a/datamodel/codeface_schema.sql b/datamodel/codeface_schema.sql
index 3d39a5b..06feb85 100644
--- a/datamodel/codeface_schema.sql
+++ b/datamodel/codeface_schema.sql
@@ -1,5 +1,5 @@
-- MySQL Script generated by MySQL Workbench
--- 11/28/16 16:14:26
+-- 11/28/16 17:00:18
-- Model: New Model Version: 1.0
-- MySQL Workbench Forward Engineering
@@ -111,34 +111,6 @@ CREATE UNIQUE INDEX `bugId_UNIQUE` ON `codeface`.`issue`
(`bugId` ASC);
-- -----------------------------------------------------
--- Table `codeface`.`issue_comment`
--- -----------------------------------------------------
-DROP TABLE IF EXISTS `codeface`.`issue_comment` ;
-
-CREATE TABLE IF NOT EXISTS `codeface`.`issue_comment` (
- `id` BIGINT NOT NULL AUTO_INCREMENT,
- `who` BIGINT NOT NULL,
- `fk_issueId` BIGINT NOT NULL,
- `commentDate` DATETIME NULL DEFAULT NULL,
- PRIMARY KEY (`id`),
- CONSTRAINT `fk_issueId`
- FOREIGN KEY (`fk_issueId`)
- REFERENCES `codeface`.`issue` (`id`)
- ON DELETE CASCADE
- ON UPDATE CASCADE,
- CONSTRAINT `issue_comment_who`
- FOREIGN KEY (`who`)
- REFERENCES `codeface`.`person` (`id`)
- ON DELETE CASCADE
- ON UPDATE CASCADE)
-ENGINE = InnoDB;
-
-CREATE INDEX `fk_issueId_idx` ON `codeface`.`issue_comment` (`fk_issueId` ASC);
-
-CREATE INDEX `issue_comment_who_idx` ON `codeface`.`issue_comment` (`who` ASC);
-
-
--- -----------------------------------------------------
-- Table `codeface`.`release_timeline`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `codeface`.`release_timeline` ;
@@ -598,6 +570,7 @@ CREATE TABLE IF NOT EXISTS `codeface`.`issue_change` (
`changeDate` DATETIME NOT NULL,
`who` BIGINT NOT NULL,
`issueId` BIGINT NOT NULL,
+ `comment` VARCHAR(255) NULL DEFAULT NULL,
PRIMARY KEY (`id`),
CONSTRAINT `issue_change_issue`
FOREIGN KEY (`issueId`)
--
2.8.3