|
|
|
@ -7,6 +7,7 @@
|
|
|
|
|
-- -----------------------------------------------------
|
|
|
|
|
CREATE TABLE IF NOT EXISTS APPM_PLATFORM (
|
|
|
|
|
ID INT NOT NULL AUTO_INCREMENT UNIQUE,
|
|
|
|
|
IDENTIFIER VARCHAR (100) NOT NULL,
|
|
|
|
|
TENANT_ID INT NOT NULL ,
|
|
|
|
|
NAME VARCHAR (255),
|
|
|
|
|
FILE_BASED BOOLEAN,
|
|
|
|
@ -14,9 +15,10 @@ DESCRIPTION LONGVARCHAR,
|
|
|
|
|
IS_SHARED BOOLEAN,
|
|
|
|
|
IS_DEFAULT_TENANT_MAPPING BOOLEAN,
|
|
|
|
|
ICON_NAME VARCHAR (100),
|
|
|
|
|
PRIMARY KEY (IDENTIFIER, TENANT_ID)
|
|
|
|
|
PRIMARY KEY (ID)
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS APPM_PLATFORM_PROPERTIES (
|
|
|
|
|
ID INT NOT NULL AUTO_INCREMENT,
|
|
|
|
|
PLATFORM_ID INT NOT NULL,
|
|
|
|
@ -120,7 +122,6 @@ INSERT INTO APPM_LIFECYCLE_STATE_TRANSITION(INITIAL_STATE, NEXT_STATE, PERMISSIO
|
|
|
|
|
CREATE TABLE IF NOT EXISTS `APPM_APPLICATION` (
|
|
|
|
|
`ID` INT NOT NULL AUTO_INCREMENT,
|
|
|
|
|
`UUID` VARCHAR(100) NOT NULL,
|
|
|
|
|
`IDENTIFIER` VARCHAR(255) NULL,
|
|
|
|
|
`NAME` VARCHAR(100) NOT NULL,
|
|
|
|
|
`SHORT_DESCRIPTION` VARCHAR(255) NULL,
|
|
|
|
|
`DESCRIPTION` TEXT NULL,
|
|
|
|
@ -319,16 +320,16 @@ CREATE TABLE IF NOT EXISTS APPM_VISIBILITY (
|
|
|
|
|
VALUE VARCHAR(255),
|
|
|
|
|
RESOURCE_TYPE_ID INT NOT NULL,
|
|
|
|
|
APPLICATION_ID INT NULL,
|
|
|
|
|
PRIMARY KEY (ID, RESOURCE_TYPE_ID),
|
|
|
|
|
PRIMARY KEY (ID),
|
|
|
|
|
CONSTRAINT fk_APPM_VISIBILITY_APPM_RESOURCE_TYPE1
|
|
|
|
|
FOREIGN KEY (RESOURCE_TYPE_ID)
|
|
|
|
|
REFERENCES APPM_RESOURCE_TYPE (ID)
|
|
|
|
|
ON DELETE CASCADE,
|
|
|
|
|
ON UPDATE CASCADE,
|
|
|
|
|
ON DELETE NO ACTION
|
|
|
|
|
ON UPDATE NO ACTION,
|
|
|
|
|
CONSTRAINT fk_APPM_VISIBILITY_APPM_APPLICATION1
|
|
|
|
|
FOREIGN KEY (APPLICATION_ID)
|
|
|
|
|
REFERENCES APPM_APPLICATION (ID)
|
|
|
|
|
ON DELETE CASCADE,
|
|
|
|
|
ON DELETE CASCADE
|
|
|
|
|
ON UPDATE CASCADE);
|
|
|
|
|
|
|
|
|
|
CREATE INDEX FK_APPM_VISIBILITY_RESOURCE_TYPE ON APPM_VISIBILITY(RESOURCE_TYPE_ID ASC);
|
|
|
|
|