|
|
|
@ -228,6 +228,7 @@ INSERT INTO APPM_LC_STATE_TRANSITION(INITIAL_STATE, NEXT_STATE, PERMISSION, DESC
|
|
|
|
|
CREATE TABLE APPM_APPLICATION (
|
|
|
|
|
ID INT UNIQUE,
|
|
|
|
|
UUID VARCHAR(100) NOT NULL,
|
|
|
|
|
ADAM_ID VARCHAR(100) DEFAULT '0',
|
|
|
|
|
IDENTIFIER VARCHAR(255) NULL,
|
|
|
|
|
NAME VARCHAR(100) NOT NULL,
|
|
|
|
|
SHORT_DESCRIPTION VARCHAR(255) NULL,
|
|
|
|
@ -255,6 +256,9 @@ CREATE TABLE APPM_APPLICATION (
|
|
|
|
|
CREATE INDEX UUID_UNIQUE ON APPM_APPLICATION(UUID ASC)
|
|
|
|
|
/
|
|
|
|
|
|
|
|
|
|
CREATE INDEX ADAM_ID_UNIQUE ON APPM_APPLICATION(ADAM_ID ASC)
|
|
|
|
|
/
|
|
|
|
|
|
|
|
|
|
CREATE INDEX FK_APP_APP_CATEGORY ON APPM_APPLICATION(APPLICATION_CATEGORY_ID ASC)
|
|
|
|
|
/
|
|
|
|
|
|
|
|
|
@ -277,6 +281,82 @@ CREATE OR REPLACE TRIGGER APPM_APPLICATION_TRIG
|
|
|
|
|
END;
|
|
|
|
|
/
|
|
|
|
|
|
|
|
|
|
-- -----------------------------------------------------
|
|
|
|
|
-- Table AP_VPP_LICENSE
|
|
|
|
|
-- -----------------------------------------------------
|
|
|
|
|
CREATE TABLE AP_VPP_LICENSE(
|
|
|
|
|
LICENSE_ID NUMBER(10) NOT NULL,
|
|
|
|
|
ADAM_ID VARCHAR2(45) NOT NULL UNIQUE ,
|
|
|
|
|
AVAILABILITY VARCHAR2(350) NOT NULL,
|
|
|
|
|
PRIMARY KEY (LICENSE_ID),
|
|
|
|
|
CONSTRAINT FK_AP_VPP_LICENSE_AP_APP
|
|
|
|
|
FOREIGN KEY (ADAM_ID)
|
|
|
|
|
REFERENCES APPM_APPLICATION (ADAM_ID)
|
|
|
|
|
);
|
|
|
|
|
/
|
|
|
|
|
|
|
|
|
|
CREATE SEQUENCE AP_VPP_LICENSE_SEQ START WITH 1 INCREMENT BY 1;
|
|
|
|
|
/
|
|
|
|
|
|
|
|
|
|
CREATE OR REPLACE TRIGGER AP_VPP_LICENSE_TRIG
|
|
|
|
|
BEFORE INSERT
|
|
|
|
|
ON AP_VPP_LICENSE
|
|
|
|
|
REFERENCING NEW AS NEW
|
|
|
|
|
FOR EACH ROW
|
|
|
|
|
BEGIN
|
|
|
|
|
SELECT AP_VPP_LICENSE_SEQ.nextval INTO :NEW.LICENSE_ID FROM dual;
|
|
|
|
|
END;
|
|
|
|
|
/
|
|
|
|
|
|
|
|
|
|
CREATE INDEX fk_AP_VPP_LICENSE_AP_APP1_idx ON AP_VPP_LICENSE (ADAM_ID ASC);
|
|
|
|
|
/
|
|
|
|
|
|
|
|
|
|
-- -----------------------------------------------------
|
|
|
|
|
-- Table AP_VPP_DEVICE
|
|
|
|
|
-- -----------------------------------------------------
|
|
|
|
|
CREATE TABLE AP_VPP_DEVICE(
|
|
|
|
|
ID NUMBER(10) NOT NULL,
|
|
|
|
|
SERIAL_NUMBER NUMBER(10) NOT NULL,
|
|
|
|
|
USER_ID NUMBER(10) NOT NULL,
|
|
|
|
|
PRIMARY KEY (ID)
|
|
|
|
|
);
|
|
|
|
|
/
|
|
|
|
|
|
|
|
|
|
CREATE SEQUENCE AP_VPP_DEVICE_SEQ START WITH 1 INCREMENT BY 1;
|
|
|
|
|
/
|
|
|
|
|
|
|
|
|
|
CREATE OR REPLACE TRIGGER AP_VPP_DEVICE_TRIG
|
|
|
|
|
BEFORE INSERT
|
|
|
|
|
ON AP_VPP_DEVICE
|
|
|
|
|
REFERENCING NEW AS NEW
|
|
|
|
|
FOR EACH ROW
|
|
|
|
|
BEGIN
|
|
|
|
|
SELECT AP_VPP_DEVICE_SEQ.nextval INTO :NEW.ID FROM dual;
|
|
|
|
|
END;
|
|
|
|
|
/
|
|
|
|
|
|
|
|
|
|
-- -----------------------------------------------------
|
|
|
|
|
-- Table AP_VPP_DEVICE_LICENSE_MAPPING
|
|
|
|
|
-- -----------------------------------------------------
|
|
|
|
|
CREATE TABLE AP_VPP_DEVICE_LICENSE_MAPPING(
|
|
|
|
|
LICENSE_ID NUMBER(10) NOT NULL,
|
|
|
|
|
DEVICE_ID NUMBER(10) NOT NULL,
|
|
|
|
|
PRIMARY KEY (LICENSE_ID, DEVICE_ID),
|
|
|
|
|
CONSTRAINT fk_AP_VPP_DEVICE_LICENSE_MAPPING_AP_VPP_DEVICE
|
|
|
|
|
FOREIGN KEY (DEVICE_ID)
|
|
|
|
|
REFERENCES AP_VPP_DEVICE (ID),
|
|
|
|
|
CONSTRAINT fk_AP_VPP_DEVICE_LICENSE_MAPPING_AP_VPP_LICENSE
|
|
|
|
|
FOREIGN KEY (LICENSE_ID)
|
|
|
|
|
REFERENCES AP_VPP_LICENSE (LICENSE_ID)
|
|
|
|
|
);
|
|
|
|
|
/
|
|
|
|
|
|
|
|
|
|
CREATE INDEX fk_AP_VPP_DEVICE_LICENSE_MAPPING_AP_VPP_DEVICE_idx ON AP_VPP_DEVICE (ID ASC);
|
|
|
|
|
/
|
|
|
|
|
|
|
|
|
|
CREATE INDEX fk_AP_VPP_DEVICE_LICENSE_MAPPING_AP_VPP_LICENSE_idx ON AP_VPP_LICENSE (LICENSE_ID ASC);
|
|
|
|
|
/
|
|
|
|
|
|
|
|
|
|
-- -----------------------------------------------------
|
|
|
|
|
-- Table APPM_APPLICATION_PROPERTY
|
|
|
|
|
-- -----------------------------------------------------
|
|
|
|
|