Changed lifecycle management to application from release

feature/appm-store/pbac
Chatura Dilan 8 years ago
parent 0d3598d214
commit fa88673ac4

@ -12,11 +12,11 @@ CREATE TABLE IF NOT EXISTS `APPM_PLATFORM` (
`IDENTIFIER` VARCHAR(100) NOT NULL, `IDENTIFIER` VARCHAR(100) NOT NULL,
`ICON_NAME` VARCHAR(100) NULL, `ICON_NAME` VARCHAR(100) NULL,
`DESCRIPTOR` LONGTEXT NOT NULL, `DESCRIPTOR` LONGTEXT NOT NULL,
`PUBLISHED` TINYINT NULL, `PUBLISHED` TINYINT(1) NULL,
PRIMARY KEY (`ID`), PRIMARY KEY (`ID`),
UNIQUE INDEX `IDENTIFIER_UNIQUE` (`IDENTIFIER` ASC)) UNIQUE INDEX `IDENTIFIER_UNIQUE` (`IDENTIFIER` ASC))
ENGINE = InnoDB ENGINE = InnoDB
COMMENT = 'This table contains the data related to the application platform'; COMMENT = 'This table contains the data related to the application platform';
-- ----------------------------------------------------- -- -----------------------------------------------------
@ -26,10 +26,10 @@ CREATE TABLE IF NOT EXISTS `APPM_APPLICATION_CATEGORY` (
`ID` INT NOT NULL AUTO_INCREMENT, `ID` INT NOT NULL AUTO_INCREMENT,
`NAME` VARCHAR(100) NOT NULL, `NAME` VARCHAR(100) NOT NULL,
`DESCRIPTION` TEXT NULL, `DESCRIPTION` TEXT NULL,
`PUBLISHED` TINYINT NULL, `PUBLISHED` TINYINT(1) NULL,
PRIMARY KEY (`ID`)) PRIMARY KEY (`ID`))
ENGINE = InnoDB ENGINE = InnoDB
COMMENT = 'This table contains the data related to the application category'; COMMENT = 'This table contains the data related to the application category';
-- ----------------------------------------------------- -- -----------------------------------------------------
@ -46,8 +46,21 @@ CREATE TABLE IF NOT EXISTS `APPM_PLATFORM_APPLICATION_MAPPING` (
REFERENCES `APPM_PLATFORM` (`ID`) REFERENCES `APPM_PLATFORM` (`ID`)
ON DELETE NO ACTION ON DELETE NO ACTION
ON UPDATE NO ACTION) ON UPDATE NO ACTION)
ENGINE = InnoDB ENGINE = InnoDB
COMMENT = 'This table contains the data related relationship between application platofrm and appication mappings'; COMMENT = 'This table contains the data related relationship between application platofrm and appication mappings';
-- -----------------------------------------------------
-- Table `APPM_LIFECYCLE_STATE`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `APPM_LIFECYCLE_STATE` (
`ID` INT NOT NULL AUTO_INCREMENT,
`NAME` VARCHAR(100) NOT NULL,
`IDENTIFIER` VARCHAR(100) NOT NULL,
`DESCRIPTION` TEXT NULL,
PRIMARY KEY (`ID`),
UNIQUE INDEX `IDENTIFIER_UNIQUE` (`IDENTIFIER` ASC))
ENGINE = InnoDB;
-- ----------------------------------------------------- -- -----------------------------------------------------
@ -66,13 +79,16 @@ CREATE TABLE IF NOT EXISTS `APPM_APPLICATION` (
`CREATED_BY` VARCHAR(255) NULL, `CREATED_BY` VARCHAR(255) NULL,
`CREATED_AT` DATETIME NOT NULL, `CREATED_AT` DATETIME NOT NULL,
`MODIFIED_AT` DATETIME NULL, `MODIFIED_AT` DATETIME NULL,
`PUBLISHED` TINYINT NULL,
`APPLICATION_CATEGORY_ID` INT NOT NULL, `APPLICATION_CATEGORY_ID` INT NOT NULL,
`PLATFORM_APPLICATION_MAPPING_ID` INT NOT NULL, `PLATFORM_APPLICATION_MAPPING_ID` INT NOT NULL,
PRIMARY KEY (`ID`, `APPLICATION_CATEGORY_ID`, `PLATFORM_APPLICATION_MAPPING_ID`), `APPM_LIFECYCLE_STATE_ID` INT NOT NULL,
`LIECYCLE_STATE_MODIFIED_BY` VARCHAR(255) NULL,
`LIFECYCLE_STATE_MODIFIED_AT` DATETIME NULL,
PRIMARY KEY (`ID`, `APPLICATION_CATEGORY_ID`, `PLATFORM_APPLICATION_MAPPING_ID`, `APPM_LIFECYCLE_STATE_ID`),
UNIQUE INDEX `UUID_UNIQUE` (`UUID` ASC), UNIQUE INDEX `UUID_UNIQUE` (`UUID` ASC),
INDEX `FK_APPLICATION_APPLICATION_CATEGORY` (`APPLICATION_CATEGORY_ID` ASC), INDEX `FK_APPLICATION_APPLICATION_CATEGORY` (`APPLICATION_CATEGORY_ID` ASC),
INDEX `FK_APPLICATION_PLATFORM_APPLICATION_MAPPING` (`PLATFORM_APPLICATION_MAPPING_ID` ASC), INDEX `FK_APPLICATION_PLATFORM_APPLICATION_MAPPING` (`PLATFORM_APPLICATION_MAPPING_ID` ASC),
INDEX `FK_APPLICATION_LIFECYCLE_STATE` (`APPM_LIFECYCLE_STATE_ID` ASC),
CONSTRAINT `FK_APPLICATION_APPLICATION_CATEGORY` CONSTRAINT `FK_APPLICATION_APPLICATION_CATEGORY`
FOREIGN KEY (`APPLICATION_CATEGORY_ID`) FOREIGN KEY (`APPLICATION_CATEGORY_ID`)
REFERENCES `APPM_APPLICATION_CATEGORY` (`ID`) REFERENCES `APPM_APPLICATION_CATEGORY` (`ID`)
@ -81,10 +97,15 @@ CREATE TABLE IF NOT EXISTS `APPM_APPLICATION` (
CONSTRAINT `fk_APPM_APPLICATION_APPM_PLATFORM_APPLICATION_MAPPING1` CONSTRAINT `fk_APPM_APPLICATION_APPM_PLATFORM_APPLICATION_MAPPING1`
FOREIGN KEY (`PLATFORM_APPLICATION_MAPPING_ID`) FOREIGN KEY (`PLATFORM_APPLICATION_MAPPING_ID`)
REFERENCES `APPM_PLATFORM_APPLICATION_MAPPING` (`ID`) REFERENCES `APPM_PLATFORM_APPLICATION_MAPPING` (`ID`)
ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT `fk_APPM_APPLICATION_APPM_LIFECYCLE_STATE1`
FOREIGN KEY (`APPM_LIFECYCLE_STATE_ID`)
REFERENCES `APPM_LIFECYCLE_STATE` (`ID`)
ON DELETE NO ACTION ON DELETE NO ACTION
ON UPDATE NO ACTION) ON UPDATE NO ACTION)
ENGINE = InnoDB ENGINE = InnoDB
COMMENT = 'This table contains the data related to the applications'; COMMENT = 'This table contains the data related to the applications';
-- ----------------------------------------------------- -- -----------------------------------------------------
@ -101,21 +122,8 @@ CREATE TABLE IF NOT EXISTS `APPM_APPLICATION_PROPERTY` (
REFERENCES `APPM_APPLICATION` (`ID`) REFERENCES `APPM_APPLICATION` (`ID`)
ON DELETE NO ACTION ON DELETE NO ACTION
ON UPDATE NO ACTION) ON UPDATE NO ACTION)
ENGINE = InnoDB ENGINE = InnoDB
COMMENT = 'This table contains the data related to the properties that related to the application'; COMMENT = 'This table contains the data related to the properties that related to the application';
-- -----------------------------------------------------
-- Table `APPM_LIFECYCLE_STATE`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `APPM_LIFECYCLE_STATE` (
`ID` INT NOT NULL AUTO_INCREMENT,
`NAME` VARCHAR(100) NOT NULL,
`IDENTIFIER` VARCHAR(100) NOT NULL,
`DESCRIPTION` TEXT NULL,
PRIMARY KEY (`ID`),
UNIQUE INDEX `IDENTIFIER_UNIQUE1` (`IDENTIFIER` ASC))
ENGINE = InnoDB;
-- ----------------------------------------------------- -- -----------------------------------------------------
@ -130,24 +138,16 @@ CREATE TABLE IF NOT EXISTS `APPM_APPLICATION_RELEASE` (
`RELEASE_DETAILS` TEXT NULL, `RELEASE_DETAILS` TEXT NULL,
`CREATED_AT` DATETIME NOT NULL, `CREATED_AT` DATETIME NOT NULL,
`APPM_APPLICATION_ID` INT NOT NULL, `APPM_APPLICATION_ID` INT NOT NULL,
`APPM_LIFECYCLE_STATE_ID` INT NOT NULL, `PUBLISHED` TINYINT(1) NULL,
`LIECYCLE_STATE_MODIFIED_BY` VARCHAR(45) NULL, PRIMARY KEY (`ID`, `APPM_APPLICATION_ID`),
`LIFECYCLE_STATE_MODIFIED_AT` DATETIME NULL,
PRIMARY KEY (`ID`, `APPM_APPLICATION_ID`, `APPM_LIFECYCLE_STATE_ID`),
INDEX `FK_APPLICATION_VERSION_APPLICATION` (`APPM_APPLICATION_ID` ASC), INDEX `FK_APPLICATION_VERSION_APPLICATION` (`APPM_APPLICATION_ID` ASC),
INDEX `FK_APPLICATION_RELEASE_APPM_LIFECYCLE_STATE` (`APPM_LIFECYCLE_STATE_ID` ASC),
CONSTRAINT `FK_APPLICATION_VERSION_APPLICATION` CONSTRAINT `FK_APPLICATION_VERSION_APPLICATION`
FOREIGN KEY (`APPM_APPLICATION_ID`) FOREIGN KEY (`APPM_APPLICATION_ID`)
REFERENCES `APPM_APPLICATION` (`ID`) REFERENCES `APPM_APPLICATION` (`ID`)
ON DELETE NO ACTION ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT `fk_APPM_APPLICATION_RELEASE_APPM_LIFECYCLE_STATE1`
FOREIGN KEY (`APPM_LIFECYCLE_STATE_ID`)
REFERENCES `APPM_LIFECYCLE_STATE` (`ID`)
ON DELETE NO ACTION
ON UPDATE NO ACTION) ON UPDATE NO ACTION)
ENGINE = InnoDB ENGINE = InnoDB
COMMENT = 'This table contains the data related to the application releases'; COMMENT = 'This table contains the data related to the application releases';
-- ----------------------------------------------------- -- -----------------------------------------------------
@ -164,8 +164,8 @@ CREATE TABLE IF NOT EXISTS `APPM_RELEASE_PROPERTY` (
REFERENCES `APPM_APPLICATION_RELEASE` (`ID`) REFERENCES `APPM_APPLICATION_RELEASE` (`ID`)
ON DELETE NO ACTION ON DELETE NO ACTION
ON UPDATE NO ACTION) ON UPDATE NO ACTION)
ENGINE = InnoDB ENGINE = InnoDB
COMMENT = 'This table contains the data related to the properties that related to the application release'; COMMENT = 'This table contains the data related to the properties that related to the application release';
-- ----------------------------------------------------- -- -----------------------------------------------------
@ -176,7 +176,7 @@ CREATE TABLE IF NOT EXISTS `APPM_RESOURCE_TYPE` (
`NAME` VARCHAR(45) NULL, `NAME` VARCHAR(45) NULL,
`DESCRIPTION` TEXT NULL, `DESCRIPTION` TEXT NULL,
PRIMARY KEY (`ID`)) PRIMARY KEY (`ID`))
ENGINE = InnoDB; ENGINE = InnoDB;
-- ----------------------------------------------------- -- -----------------------------------------------------
@ -208,8 +208,8 @@ CREATE TABLE IF NOT EXISTS `APPM_SUBSCRIPTION` (
REFERENCES `APPM_APPLICATION_RELEASE` (`ID`) REFERENCES `APPM_APPLICATION_RELEASE` (`ID`)
ON DELETE NO ACTION ON DELETE NO ACTION
ON UPDATE NO ACTION) ON UPDATE NO ACTION)
ENGINE = InnoDB ENGINE = InnoDB
COMMENT = 'This table contains the data related to the application subscriptions'; COMMENT = 'This table contains the data related to the application subscriptions';
-- ----------------------------------------------------- -- -----------------------------------------------------
@ -225,7 +225,8 @@ CREATE TABLE IF NOT EXISTS `APPM_COMMENT` (
`CREATED_AT` DATETIME NOT NULL, `CREATED_AT` DATETIME NOT NULL,
`CREATED_BY` VARCHAR(45) NULL, `CREATED_BY` VARCHAR(45) NULL,
`MODIFIED_AT` DATETIME NULL, `MODIFIED_AT` DATETIME NULL,
`PUBLISHED` TINYINT NULL, `PUBLISHED` TINYINT(1) NULL,
`APPROVED` TINYINT(1) NULL,
PRIMARY KEY (`ID`, `APPLICATION_RELEASE_ID`), PRIMARY KEY (`ID`, `APPLICATION_RELEASE_ID`),
INDEX `FK_APPLICATION_COMMENTS_APPLICATION_RELEASE` (`APPLICATION_RELEASE_ID` ASC), INDEX `FK_APPLICATION_COMMENTS_APPLICATION_RELEASE` (`APPLICATION_RELEASE_ID` ASC),
CONSTRAINT `FK_APPLICATION_COMMENTS_APPLICATION_RELEASE` CONSTRAINT `FK_APPLICATION_COMMENTS_APPLICATION_RELEASE`
@ -233,8 +234,8 @@ CREATE TABLE IF NOT EXISTS `APPM_COMMENT` (
REFERENCES `APPM_APPLICATION_RELEASE` (`ID`) REFERENCES `APPM_APPLICATION_RELEASE` (`ID`)
ON DELETE NO ACTION ON DELETE NO ACTION
ON UPDATE NO ACTION) ON UPDATE NO ACTION)
ENGINE = InnoDB ENGINE = InnoDB
COMMENT = 'This table contains the data related to the application comments'; COMMENT = 'This table contains the data related to the application comments';
-- ----------------------------------------------------- -- -----------------------------------------------------
@ -250,8 +251,8 @@ CREATE TABLE IF NOT EXISTS `APPM_PLATFORM_TAG` (
REFERENCES `APPM_PLATFORM` (`ID`) REFERENCES `APPM_PLATFORM` (`ID`)
ON DELETE NO ACTION ON DELETE NO ACTION
ON UPDATE NO ACTION) ON UPDATE NO ACTION)
ENGINE = InnoDB ENGINE = InnoDB
COMMENT = 'This table contains the data related to the app platform tag'; COMMENT = 'This table contains the data related to the app platform tag';
-- ----------------------------------------------------- -- -----------------------------------------------------
@ -267,8 +268,8 @@ CREATE TABLE IF NOT EXISTS `APPM_APPLICATION_TAG` (
REFERENCES `APPM_APPLICATION` (`ID`) REFERENCES `APPM_APPLICATION` (`ID`)
ON DELETE NO ACTION ON DELETE NO ACTION
ON UPDATE NO ACTION) ON UPDATE NO ACTION)
ENGINE = InnoDB ENGINE = InnoDB
COMMENT = 'This table contains the data related to the application tags'; COMMENT = 'This table contains the data related to the application tags';
-- ----------------------------------------------------- -- -----------------------------------------------------
@ -299,7 +300,7 @@ CREATE TABLE IF NOT EXISTS `APPM_VISIBILITY` (
REFERENCES `APPM_APPLICATION` (`ID`) REFERENCES `APPM_APPLICATION` (`ID`)
ON DELETE NO ACTION ON DELETE NO ACTION
ON UPDATE NO ACTION) ON UPDATE NO ACTION)
ENGINE = InnoDB; ENGINE = InnoDB;
-- ----------------------------------------------------- -- -----------------------------------------------------
@ -316,4 +317,4 @@ CREATE TABLE IF NOT EXISTS `APPM_SUBSCRIPTION_PROPERTIES` (
REFERENCES `APPM_SUBSCRIPTION` (`ID`) REFERENCES `APPM_SUBSCRIPTION` (`ID`)
ON DELETE NO ACTION ON DELETE NO ACTION
ON UPDATE NO ACTION) ON UPDATE NO ACTION)
ENGINE = InnoDB; ENGINE = InnoDB;
Loading…
Cancel
Save