diff --git a/features/application-mgt/io.entgra.application.mgt.server.feature/src/main/resources/dbscripts/cdm/application-mgt/h2.sql b/features/application-mgt/io.entgra.application.mgt.server.feature/src/main/resources/dbscripts/cdm/application-mgt/h2.sql index 6b07c6b7579..c903ec78df5 100644 --- a/features/application-mgt/io.entgra.application.mgt.server.feature/src/main/resources/dbscripts/cdm/application-mgt/h2.sql +++ b/features/application-mgt/io.entgra.application.mgt.server.feature/src/main/resources/dbscripts/cdm/application-mgt/h2.sql @@ -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 -- ----------------------------------------------------- diff --git a/features/application-mgt/io.entgra.application.mgt.server.feature/src/main/resources/dbscripts/cdm/application-mgt/mssql.sql b/features/application-mgt/io.entgra.application.mgt.server.feature/src/main/resources/dbscripts/cdm/application-mgt/mssql.sql index f1a41956995..d52bed69575 100644 --- a/features/application-mgt/io.entgra.application.mgt.server.feature/src/main/resources/dbscripts/cdm/application-mgt/mssql.sql +++ b/features/application-mgt/io.entgra.application.mgt.server.feature/src/main/resources/dbscripts/cdm/application-mgt/mssql.sql @@ -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 -- ----------------------------------------------------- diff --git a/features/application-mgt/io.entgra.application.mgt.server.feature/src/main/resources/dbscripts/cdm/application-mgt/mysql.sql b/features/application-mgt/io.entgra.application.mgt.server.feature/src/main/resources/dbscripts/cdm/application-mgt/mysql.sql index 2d773378821..53178ef727a 100644 --- a/features/application-mgt/io.entgra.application.mgt.server.feature/src/main/resources/dbscripts/cdm/application-mgt/mysql.sql +++ b/features/application-mgt/io.entgra.application.mgt.server.feature/src/main/resources/dbscripts/cdm/application-mgt/mysql.sql @@ -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( diff --git a/features/application-mgt/io.entgra.application.mgt.server.feature/src/main/resources/dbscripts/cdm/application-mgt/oracle.sql b/features/application-mgt/io.entgra.application.mgt.server.feature/src/main/resources/dbscripts/cdm/application-mgt/oracle.sql index b15ef930f6a..b16c3014037 100644 --- a/features/application-mgt/io.entgra.application.mgt.server.feature/src/main/resources/dbscripts/cdm/application-mgt/oracle.sql +++ b/features/application-mgt/io.entgra.application.mgt.server.feature/src/main/resources/dbscripts/cdm/application-mgt/oracle.sql @@ -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, diff --git a/features/application-mgt/io.entgra.application.mgt.server.feature/src/main/resources/dbscripts/cdm/application-mgt/postgresql.sql b/features/application-mgt/io.entgra.application.mgt.server.feature/src/main/resources/dbscripts/cdm/application-mgt/postgresql.sql index e5f83986d68..6c85f15e82d 100644 --- a/features/application-mgt/io.entgra.application.mgt.server.feature/src/main/resources/dbscripts/cdm/application-mgt/postgresql.sql +++ b/features/application-mgt/io.entgra.application.mgt.server.feature/src/main/resources/dbscripts/cdm/application-mgt/postgresql.sql @@ -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