Fix service provider app integration dbscripts

temp
Mohamed Rashd 3 years ago
parent 270904102d
commit cadc9c9c87

@ -279,6 +279,38 @@ CREATE TABLE IF NOT EXISTS AP_SCHEDULED_SUBSCRIPTION(
REFERENCES AP_APP_RELEASE (UUID) ON DELETE NO ACTION ON UPDATE NO ACTION
);
-- -----------------------------------------------------
-- Table AP_IDENTITY_SERVER
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS AP_IDENTITY_SERVER (
ID INTEGER NOT NULL AUTO_INCREMENT,
NAME VARCHAR(255) NOT NULL,
DESCRIPTION VARCHAR(255) NOT NULL,
URL VARCHAR(255) NOT NULL,
SP_APPS_URI VARCHAR(255) NOT NULL,
SP_APPS_API VARCHAR(255) NULL,
TENANT_ID INT NOT NULL,
USERNAME VARCHAR(255) NOT NULL,
PASSWORD VARCHAR(255) NOT NULL
PRIMARY KEY(ID)
);
-- -----------------------------------------------------
-- Table AP_IS_SP_APP_MAPPING
-- -----------------------------------------------------;
CREATE TABLE IF NOT EXISTS AP_IS_SP_APP_MAPPING (
ID INTEGER NOT NULL AUTO_INCREMENT,
SP_UID VARCHAR(255) NOT NULL,
AP_APP_ID INT NOT NULL,
IS_ID INT NOT NULL,
TENANT_ID INT NOT NULL,
PRIMARY KEY(ID),
CONSTRAINT AP_IS_SP_APP_MAPPING_AP_APP_ID_fk FOREIGN KEY (AP_APP_ID) REFERENCES AP_APP (ID)
ON DELETE NO ACTION ON UPDATE NO ACTION,
CONSTRAINT AP_IS_SP_APP_MAPPING_AP_IDENTITY_SERVER_ID_fk FOREIGN KEY (IS_ID) REFERENCES AP_IDENTITY_SERVER (ID)
ON DELETE NO ACTION ON UPDATE NO ACTION
);
-- -----------------------------------------------------
-- Table AP_APP_FAVOURITES
-- -----------------------------------------------------

@ -280,6 +280,36 @@ CREATE TABLE AP_SCHEDULED_SUBSCRIPTION(
REFERENCES AP_APP_RELEASE (UUID) ON DELETE NO ACTION ON UPDATE NO ACTION
);
-- -----------------------------------------------------
-- Table AP_IDENTITY_SERVER
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS AP_IDENTITY_SERVER (
ID INTEGER NOT NULL IDENTITY,
NAME VARCHAR(255) NOT NULL,
DESCRIPTION VARCHAR(255) NOT NULL,
URL VARCHAR(255) NOT NULL,
SP_APPS_URI VARCHAR(255) NOT NULL,
SP_APPS_API VARCHAR(255) NULL,
TENANT_ID INT NOT NULL,
USERNAME VARCHAR(255) NOT NULL,
PASSWORD VARCHAR(255) NOT NULL
PRIMARY KEY(ID)
);
-- -----------------------------------------------------
-- Table AP_IS_SP_APP_MAPPING
-- -----------------------------------------------------;
CREATE TABLE IF NOT EXISTS AP_IS_SP_APP_MAPPING (
ID INTEGER NOT NULL IDENTITY,
SP_UID VARCHAR(255) NOT NULL,
AP_APP_ID INT NOT NULL,
IS_ID INT NOT NULL,
TENANT_ID INT NOT NULL,
PRIMARY KEY(ID),
CONSTRAINT AP_IS_SP_APP_MAPPING_AP_APP_ID_fk FOREIGN KEY (AP_APP_ID) REFERENCES AP_APP (ID),
CONSTRAINT AP_IS_SP_APP_MAPPING_AP_IDENTITY_SERVER_ID_fk FOREIGN KEY (IS_ID) REFERENCES AP_IDENTITY_SERVER (ID)
);
-- -----------------------------------------------------
-- Table AP_APP_FAVOURITES
-- -----------------------------------------------------

@ -248,9 +248,10 @@ CREATE TABLE IF NOT EXISTS AP_IDENTITY_SERVER (
TENANT_ID INT NOT NULL,
USERNAME VARCHAR(255) NOT NULL,
PASSWORD VARCHAR(255) NOT NULL
) -- -----------------------------------------------------
);
-- -----------------------------------------------------
-- Table AP_IS_SP_APP_MAPPING
-- -----------------------------------------------------;
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS AP_IS_SP_APP_MAPPING (
ID INT AUTO_INCREMENT PRIMARY KEY,
SP_UID VARCHAR(255) NOT NULL,
@ -260,6 +261,7 @@ CREATE TABLE IF NOT EXISTS AP_IS_SP_APP_MAPPING (
CONSTRAINT AP_IS_SP_APP_MAPPING_AP_APP_ID_fk FOREIGN KEY (AP_APP_ID) REFERENCES AP_APP (ID),
CONSTRAINT AP_IS_SP_APP_MAPPING_AP_IDENTITY_SERVER_ID_fk FOREIGN KEY (IS_ID) REFERENCES AP_IDENTITY_SERVER (ID)
);
-- -----------------------------------------------------
-- Table AP_APP_FAVOURITES
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS AP_APP_FAVOURITES(

@ -383,6 +383,32 @@ CREATE TABLE AP_SCHEDULED_SUBSCRIPTION (
)
/
CREATE TABLE IF NOT EXISTS AP_IDENTITY_SERVER (
ID number GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL,
NAME VARCHAR(255) NOT NULL,
DESCRIPTION VARCHAR(255) NOT NULL,
URL VARCHAR(255) NOT NULL,
SP_APPS_URI VARCHAR(255) NOT NULL,
SP_APPS_API VARCHAR(255) NULL,
TENANT_ID INT NOT NULL,
USERNAME VARCHAR(255) NOT NULL,
PASSWORD VARCHAR(255) NOT NULL
PRIMARY KEY(ID)
)
/
CREATE TABLE IF NOT EXISTS AP_IS_SP_APP_MAPPING (
ID number GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL,
SP_UID VARCHAR(255) NOT NULL,
AP_APP_ID INT NOT NULL,
IS_ID INT NOT NULL,
TENANT_ID INT NOT NULL,
PRIMARY KEY(ID),
CONSTRAINT AP_IS_SP_APP_MAPPING_AP_APP_ID_fk FOREIGN KEY (AP_APP_ID) REFERENCES AP_APP (ID),
CONSTRAINT AP_IS_SP_APP_MAPPING_AP_IDENTITY_SERVER_ID_fk FOREIGN KEY (IS_ID) REFERENCES AP_IDENTITY_SERVER (ID)
)
/
CREATE TABLE IF NOT EXISTS AP_APP_FAVOURITES(
ID number GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL,
AP_APP_ID INTEGER NOT NULL,

@ -306,6 +306,37 @@ CREATE TABLE IF NOT EXISTS AP_SCHEDULED_SUBSCRIPTION(
PRIMARY KEY (ID)
);
-- -----------------------------------------------------
-- Table AP_IDENTITY_SERVER
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS AP_IDENTITY_SERVER (
ID INTEGER NOT NULL DEFAULT NEXTVAL ('AP_IDENTITY_SERVER_seq'),
NAME VARCHAR(255) NOT NULL,
DESCRIPTION VARCHAR(255) NOT NULL,
URL VARCHAR(255) NOT NULL,
SP_APPS_URI VARCHAR(255) NOT NULL,
SP_APPS_API VARCHAR(255) NULL,
TENANT_ID INT NOT NULL,
USERNAME VARCHAR(255) NOT NULL,
PASSWORD VARCHAR(255) NOT NULL
PRIMARY KEY(ID)
);
-- -----------------------------------------------------
-- Table AP_IS_SP_APP_MAPPING
-- -----------------------------------------------------;
CREATE TABLE IF NOT EXISTS AP_IS_SP_APP_MAPPING (
ID INTEGER NOT NULL DEFAULT NEXTVAL ('AP_IS_SP_APP_MAPPING_seq'),
SP_UID VARCHAR(255) NOT NULL,
AP_APP_ID INT NOT NULL,
IS_ID INT NOT NULL,
TENANT_ID INT NOT NULL,
PRIMARY KEY(ID),
CONSTRAINT AP_IS_SP_APP_MAPPING_AP_APP_ID_fk FOREIGN KEY (AP_APP_ID) REFERENCES AP_APP (ID)
ON DELETE NO ACTION ON UPDATE NO ACTION,
CONSTRAINT AP_IS_SP_APP_MAPPING_AP_IDENTITY_SERVER_ID_fk FOREIGN KEY (IS_ID) REFERENCES AP_IDENTITY_SERVER (ID)
ON DELETE NO ACTION ON UPDATE NO ACTION
);
-- -----------------------------------------------------
-- Table AP_APP_FAVOURITES

Loading…
Cancel
Save