From efe53204c886bc135ccfde13b0c6d3320b3f542c Mon Sep 17 00:00:00 2001 From: Menaka Madushanka Date: Tue, 8 Dec 2015 10:54:05 +0530 Subject: [PATCH 01/24] Added the accelerometer script --- .../EventReceiver_accelerometer.xml | 8 ++++ .../artifact.xml | 4 ++ .../artifact.xml | 4 ++ .../org_wso2_iot_devices_accelerometer.xml | 44 +++++++++++++++++++ .../artifact.xml | 5 +++ ....wso2.iot.devices.accelerometer_1.0.0.json | 20 +++++++++ .../Accelerometer_Sensor_Script.xml | 13 ++++++ .../Sparkscripts_1.0.0/artifact.xml | 4 ++ .../carbonapps/Accelerometer/artifacts.xml | 11 +++++ .../src/statistics/carbonapps/build.xml | 7 +-- 10 files changed, 117 insertions(+), 3 deletions(-) create mode 100644 modules/distribution/src/statistics/carbonapps/Accelerometer/Eventreceiver_accelerometer_1.0.0/EventReceiver_accelerometer.xml create mode 100644 modules/distribution/src/statistics/carbonapps/Accelerometer/Eventreceiver_accelerometer_1.0.0/artifact.xml create mode 100644 modules/distribution/src/statistics/carbonapps/Accelerometer/Eventstore_accelerometer_1.0.0/artifact.xml create mode 100644 modules/distribution/src/statistics/carbonapps/Accelerometer/Eventstore_accelerometer_1.0.0/org_wso2_iot_devices_accelerometer.xml create mode 100644 modules/distribution/src/statistics/carbonapps/Accelerometer/Eventstream_accelerometer_1.0.0/artifact.xml create mode 100644 modules/distribution/src/statistics/carbonapps/Accelerometer/Eventstream_accelerometer_1.0.0/org.wso2.iot.devices.accelerometer_1.0.0.json create mode 100644 modules/distribution/src/statistics/carbonapps/Accelerometer/Sparkscripts_1.0.0/Accelerometer_Sensor_Script.xml create mode 100644 modules/distribution/src/statistics/carbonapps/Accelerometer/Sparkscripts_1.0.0/artifact.xml create mode 100644 modules/distribution/src/statistics/carbonapps/Accelerometer/artifacts.xml diff --git a/modules/distribution/src/statistics/carbonapps/Accelerometer/Eventreceiver_accelerometer_1.0.0/EventReceiver_accelerometer.xml b/modules/distribution/src/statistics/carbonapps/Accelerometer/Eventreceiver_accelerometer_1.0.0/EventReceiver_accelerometer.xml new file mode 100644 index 00000000..2e43c8c1 --- /dev/null +++ b/modules/distribution/src/statistics/carbonapps/Accelerometer/Eventreceiver_accelerometer_1.0.0/EventReceiver_accelerometer.xml @@ -0,0 +1,8 @@ + + + + false + + + + diff --git a/modules/distribution/src/statistics/carbonapps/Accelerometer/Eventreceiver_accelerometer_1.0.0/artifact.xml b/modules/distribution/src/statistics/carbonapps/Accelerometer/Eventreceiver_accelerometer_1.0.0/artifact.xml new file mode 100644 index 00000000..0875edb2 --- /dev/null +++ b/modules/distribution/src/statistics/carbonapps/Accelerometer/Eventreceiver_accelerometer_1.0.0/artifact.xml @@ -0,0 +1,4 @@ + + + EventReceiver_accelerometer.xml + diff --git a/modules/distribution/src/statistics/carbonapps/Accelerometer/Eventstore_accelerometer_1.0.0/artifact.xml b/modules/distribution/src/statistics/carbonapps/Accelerometer/Eventstore_accelerometer_1.0.0/artifact.xml new file mode 100644 index 00000000..9e6f1e84 --- /dev/null +++ b/modules/distribution/src/statistics/carbonapps/Accelerometer/Eventstore_accelerometer_1.0.0/artifact.xml @@ -0,0 +1,4 @@ + + + org_wso2_iot_devices_accelerometer.xml + diff --git a/modules/distribution/src/statistics/carbonapps/Accelerometer/Eventstore_accelerometer_1.0.0/org_wso2_iot_devices_accelerometer.xml b/modules/distribution/src/statistics/carbonapps/Accelerometer/Eventstore_accelerometer_1.0.0/org_wso2_iot_devices_accelerometer.xml new file mode 100644 index 00000000..77bec2a3 --- /dev/null +++ b/modules/distribution/src/statistics/carbonapps/Accelerometer/Eventstore_accelerometer_1.0.0/org_wso2_iot_devices_accelerometer.xml @@ -0,0 +1,44 @@ + + + + org.wso2.iot.devices.accelerometer:1.0.0 + + EVENT_STORE + + + meta_owner + true + true + false + STRING + + + meta_deviceType + true + true + false + STRING + + + meta_deviceId + true + true + false + STRING + + + meta_time + true + true + false + LONG + + + battery + false + false + false + FLOAT + + + \ No newline at end of file diff --git a/modules/distribution/src/statistics/carbonapps/Accelerometer/Eventstream_accelerometer_1.0.0/artifact.xml b/modules/distribution/src/statistics/carbonapps/Accelerometer/Eventstream_accelerometer_1.0.0/artifact.xml new file mode 100644 index 00000000..94cfa5d3 --- /dev/null +++ b/modules/distribution/src/statistics/carbonapps/Accelerometer/Eventstream_accelerometer_1.0.0/artifact.xml @@ -0,0 +1,5 @@ + + + org.wso2.iot.devices.accelerometer_1.0.0.json + + diff --git a/modules/distribution/src/statistics/carbonapps/Accelerometer/Eventstream_accelerometer_1.0.0/org.wso2.iot.devices.accelerometer_1.0.0.json b/modules/distribution/src/statistics/carbonapps/Accelerometer/Eventstream_accelerometer_1.0.0/org.wso2.iot.devices.accelerometer_1.0.0.json new file mode 100644 index 00000000..db6af8ee --- /dev/null +++ b/modules/distribution/src/statistics/carbonapps/Accelerometer/Eventstream_accelerometer_1.0.0/org.wso2.iot.devices.accelerometer_1.0.0.json @@ -0,0 +1,20 @@ +{ + "name": "org.wso2.iot.devices.accelerometer", + "version": "1.0.0", + "nickName": "accelerometer Data", + "description": "accelerometer data received from the Device", + "metaData": [ + {"name":"owner","type":"STRING"}, + {"name":"deviceType","type":"STRING"}, + {"name":"deviceId","type":"STRING"}, + {"name":"time","type":"LONG"} + ], + "payloadData": [ + { + "name": "accelerometer","type": "FLOAT" + } + ] +} + + + diff --git a/modules/distribution/src/statistics/carbonapps/Accelerometer/Sparkscripts_1.0.0/Accelerometer_Sensor_Script.xml b/modules/distribution/src/statistics/carbonapps/Accelerometer/Sparkscripts_1.0.0/Accelerometer_Sensor_Script.xml new file mode 100644 index 00000000..b1cf3810 --- /dev/null +++ b/modules/distribution/src/statistics/carbonapps/Accelerometer/Sparkscripts_1.0.0/Accelerometer_Sensor_Script.xml @@ -0,0 +1,13 @@ + + + Accelerometer_Sensor_Script + + 0 * * * * ? + diff --git a/modules/distribution/src/statistics/carbonapps/Accelerometer/Sparkscripts_1.0.0/artifact.xml b/modules/distribution/src/statistics/carbonapps/Accelerometer/Sparkscripts_1.0.0/artifact.xml new file mode 100644 index 00000000..483e0c13 --- /dev/null +++ b/modules/distribution/src/statistics/carbonapps/Accelerometer/Sparkscripts_1.0.0/artifact.xml @@ -0,0 +1,4 @@ + + + Accelerometer_Sensor_Script.xml + diff --git a/modules/distribution/src/statistics/carbonapps/Accelerometer/artifacts.xml b/modules/distribution/src/statistics/carbonapps/Accelerometer/artifacts.xml new file mode 100644 index 00000000..88a8d5f5 --- /dev/null +++ b/modules/distribution/src/statistics/carbonapps/Accelerometer/artifacts.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/modules/distribution/src/statistics/carbonapps/build.xml b/modules/distribution/src/statistics/carbonapps/build.xml index 9494cf93..129ecab7 100644 --- a/modules/distribution/src/statistics/carbonapps/build.xml +++ b/modules/distribution/src/statistics/carbonapps/build.xml @@ -9,6 +9,7 @@ + @@ -29,8 +30,8 @@ + + + - - - From 309d38de7260e7fb9a9029731935c4823571767e Mon Sep 17 00:00:00 2001 From: Menaka Madushanka Date: Tue, 8 Dec 2015 10:59:05 +0530 Subject: [PATCH 02/24] Added the accelerometer script --- .../carbonapps/Accelerometer/Sparkscripts_1.0.0/artifact.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/distribution/src/statistics/carbonapps/Accelerometer/Sparkscripts_1.0.0/artifact.xml b/modules/distribution/src/statistics/carbonapps/Accelerometer/Sparkscripts_1.0.0/artifact.xml index 483e0c13..9c88d819 100644 --- a/modules/distribution/src/statistics/carbonapps/Accelerometer/Sparkscripts_1.0.0/artifact.xml +++ b/modules/distribution/src/statistics/carbonapps/Accelerometer/Sparkscripts_1.0.0/artifact.xml @@ -2,3 +2,4 @@ Accelerometer_Sensor_Script.xml + From 5b7fee60438ca4a8f6829665ba383b2775fcd5e1 Mon Sep 17 00:00:00 2001 From: charithag Date: Thu, 10 Dec 2015 13:43:47 +0530 Subject: [PATCH 03/24] Excluded jaggery.conf in uuf-base app --- modules/distribution/src/assembly/bin.xml | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/modules/distribution/src/assembly/bin.xml b/modules/distribution/src/assembly/bin.xml index 3f73b0ad..2272fe66 100644 --- a/modules/distribution/src/assembly/bin.xml +++ b/modules/distribution/src/assembly/bin.xml @@ -365,16 +365,6 @@ dynamic-client-web.war - - - - - - ../apps/jaggery/mdm/src/mdm/ - - ${pom.artifactId}-${pom.version}/repository/deployment/server/jaggeryapps/mdm - - @@ -384,6 +374,9 @@ ${pom.artifactId}-${pom.version}/repository/deployment/server/jaggeryapps/devicemgt + + jaggery.conf + From 8cc653a78807f3499a9fdf5f57cbc22dc7302bf0 Mon Sep 17 00:00:00 2001 From: Ace Date: Thu, 10 Dec 2015 14:31:01 +0530 Subject: [PATCH 04/24] bumping identity to 5.0.3 and other fixes --- modules/distribution/pom.xml | 2 +- modules/distribution/src/assembly/bin.xml | 3 +- .../dbscripts/apimgt/h2-sample-data.sql | 61 + .../resources/dbscripts/apimgt/h2.sql | 779 ++++++++++ .../resources/dbscripts/apimgt/mssql.sql | 858 +++++++++++ .../resources/dbscripts/apimgt/mysql.sql | 798 +++++++++++ .../resources/dbscripts/apimgt/oracle.sql | 1256 +++++++++++++++++ .../resources/dbscripts/apimgt/oracle_rac.sql | 1253 ++++++++++++++++ .../resources/dbscripts/apimgt/postgresql.sql | 908 ++++++++++++ pom.xml | 2 +- 10 files changed, 5917 insertions(+), 3 deletions(-) create mode 100644 modules/distribution/src/repository/resources/dbscripts/apimgt/h2-sample-data.sql create mode 100644 modules/distribution/src/repository/resources/dbscripts/apimgt/h2.sql create mode 100644 modules/distribution/src/repository/resources/dbscripts/apimgt/mssql.sql create mode 100644 modules/distribution/src/repository/resources/dbscripts/apimgt/mysql.sql create mode 100644 modules/distribution/src/repository/resources/dbscripts/apimgt/oracle.sql create mode 100644 modules/distribution/src/repository/resources/dbscripts/apimgt/oracle_rac.sql create mode 100644 modules/distribution/src/repository/resources/dbscripts/apimgt/postgresql.sql diff --git a/modules/distribution/pom.xml b/modules/distribution/pom.xml index c7828d37..cee5578e 100644 --- a/modules/distribution/pom.xml +++ b/modules/distribution/pom.xml @@ -316,7 +316,7 @@ + file="${basedir}/src/repository/resources/dbscripts/apimgt/h2.sql"/> diff --git a/modules/distribution/src/assembly/bin.xml b/modules/distribution/src/assembly/bin.xml index 3f73b0ad..cbba82c8 100644 --- a/modules/distribution/src/assembly/bin.xml +++ b/modules/distribution/src/assembly/bin.xml @@ -277,7 +277,7 @@ - ../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/dbscripts/apimgt + src/repository/resources/dbscripts/apimgt ${pom.artifactId}-${pom.version}/dbscripts/apimgt @@ -469,6 +469,7 @@ **/saml1-assertion-config **/msg-mgt.properties **/entitlement.properties + **/EndpointConfig.properties diff --git a/modules/distribution/src/repository/resources/dbscripts/apimgt/h2-sample-data.sql b/modules/distribution/src/repository/resources/dbscripts/apimgt/h2-sample-data.sql new file mode 100644 index 00000000..2e83b858 --- /dev/null +++ b/modules/distribution/src/repository/resources/dbscripts/apimgt/h2-sample-data.sql @@ -0,0 +1,61 @@ +DELETE FROM AM_SUBSCRIPTION_KEY_MAPPING; +DELETE FROM AM_APPLICATION_KEY_MAPPING; +DELETE FROM AM_SUBSCRIPTION ; +DELETE FROM AM_APPLICATION ; +DELETE FROM AM_SUBSCRIBER; +DELETE FROM AM_API; +DELETE FROM IDN_OAUTH2_ACCESS_TOKEN ; +DELETE FROM IDN_OAUTH_CONSUMER_APPS; + +ALTER TABLE AM_SUBSCRIBER ALTER COLUMN SUBSCRIBER_ID RESTART WITH 1; +ALTER TABLE AM_APPLICATION ALTER COLUMN APPLICATION_ID RESTART WITH 100; +ALTER TABLE AM_API ALTER COLUMN API_ID RESTART WITH 500; +ALTER TABLE AM_SUBSCRIPTION ALTER COLUMN SUBSCRIPTION_ID RESTART WITH 1000; + +INSERT INTO AM_SUBSCRIBER ( USER_ID , TENANT_ID , EMAIL_ADDRESS , DATE_SUBSCRIBED ) VALUES ('SUMEDHA',-1234,'SUMEDHA@WSO2.COM','2012-03-05 12:10:11'); +INSERT INTO AM_SUBSCRIBER ( USER_ID , TENANT_ID , EMAIL_ADDRESS , DATE_SUBSCRIBED ) VALUES ('PRABATH',-1234,'PRABATH@WSO2.COM','2012-03-05 12:10:11'); +INSERT INTO AM_SUBSCRIBER ( USER_ID , TENANT_ID , EMAIL_ADDRESS , DATE_SUBSCRIBED ) VALUES ('THILINA',-1234,'THILINA@WSO2.COM','2012-03-05 12:10:11'); +INSERT INTO AM_SUBSCRIBER ( USER_ID , TENANT_ID , EMAIL_ADDRESS , DATE_SUBSCRIBED ) VALUES ('UDAYANGA',-1234,'UDAYANGA@WSO2.COM','2012-03-05 12:10:11'); + + +INSERT INTO AM_APPLICATION (NAME,SUBSCRIBER_ID ) VALUES ('APPLICATION1',1); +INSERT INTO AM_APPLICATION (NAME,SUBSCRIBER_ID ) VALUES ('APPLICATION2',1); +INSERT INTO AM_APPLICATION (NAME,SUBSCRIBER_ID ) VALUES ('APPLICATION3',2); +INSERT INTO AM_APPLICATION (NAME,SUBSCRIBER_ID ) VALUES ('APPLICATION4',2); +INSERT INTO AM_APPLICATION (NAME,SUBSCRIBER_ID ) VALUES ('APPLICATION5',3); +INSERT INTO AM_APPLICATION (NAME,SUBSCRIBER_ID ) VALUES ('DeliciousApp',4); + +INSERT INTO AM_API (API_PROVIDER,API_NAME,API_VERSION,CONTEXT) VALUES ('SUMEDHA', 'API1', 'V1.0.0','/context1'); +INSERT INTO AM_API (API_PROVIDER,API_NAME,API_VERSION,CONTEXT) VALUES ('PRABATH', 'API2', 'V1.0.0','/deli2'); +INSERT INTO AM_API (API_PROVIDER,API_NAME,API_VERSION,CONTEXT) VALUES ('ADMIN', 'API3', 'V1.0.0','/test'); +INSERT INTO AM_API (API_PROVIDER,API_NAME,API_VERSION,CONTEXT) VALUES ('DEL', 'Delicious', '1.0.0','/deli'); + +INSERT INTO AM_SUBSCRIPTION ( TIER_ID , API_ID , APPLICATION_ID , LAST_ACCESSED ) VALUES ('T1',500,100,'2012-03-05 12:10:11'); +INSERT INTO AM_SUBSCRIPTION ( TIER_ID , API_ID , APPLICATION_ID , LAST_ACCESSED ) VALUES ('T1',501,101,'2012-03-05 12:10:11'); +INSERT INTO AM_SUBSCRIPTION ( TIER_ID , API_ID , APPLICATION_ID , LAST_ACCESSED ) VALUES ('T1',500,102,'2012-03-05 12:10:11'); +INSERT INTO AM_SUBSCRIPTION ( TIER_ID , API_ID , APPLICATION_ID , LAST_ACCESSED ) VALUES ('T1',502,103,'2012-03-05 12:10:11'); +INSERT INTO AM_SUBSCRIPTION ( TIER_ID , API_ID , APPLICATION_ID , LAST_ACCESSED ) VALUES ('T1',501,104,'2012-03-05 12:10:11'); +INSERT INTO AM_SUBSCRIPTION ( TIER_ID , API_ID , APPLICATION_ID , LAST_ACCESSED ) VALUES ('T1',503,105,'2012-03-05 12:10:11'); +INSERT INTO AM_SUBSCRIPTION ( TIER_ID , API_ID , APPLICATION_ID , LAST_ACCESSED ) VALUES ('T1',501,102,'2012-03-05 12:10:11'); + +INSERT INTO AM_SUBSCRIPTION_KEY_MAPPING (SUBSCRIPTION_ID, ACCESS_TOKEN, KEY_TYPE) VALUES (1000, 'SSDCHEJJ-AWUIS-232', 'PRODUCTION'); +INSERT INTO AM_SUBSCRIPTION_KEY_MAPPING (SUBSCRIPTION_ID, ACCESS_TOKEN, KEY_TYPE) VALUES (1001, 'a1b2c3d4', 'SANDBOX'); +INSERT INTO AM_SUBSCRIPTION_KEY_MAPPING (SUBSCRIPTION_ID, ACCESS_TOKEN, KEY_TYPE) VALUES (1002, 'p1q2r3s4', 'PRODUCTION'); + +INSERT INTO AM_APPLICATION_KEY_MAPPING (APPLICATION_ID, CONSUMER_KEY, KEY_TYPE) VALUES (100, 'CON1', 'PRODUCTION'); +INSERT INTO AM_APPLICATION_KEY_MAPPING (APPLICATION_ID, CONSUMER_KEY, KEY_TYPE) VALUES (100, 'CON2', 'SANDBOX'); +INSERT INTO AM_APPLICATION_KEY_MAPPING (APPLICATION_ID, CONSUMER_KEY, KEY_TYPE) VALUES (101, 'CON3', 'PRODUCTION'); + +INSERT INTO IDN_OAUTH_CONSUMER_APPS ( APP_NAME , CALLBACK_URL , CONSUMER_KEY , CONSUMER_SECRET ,OAUTH_VERSION , TENANT_ID , USERNAME ) VALUES (NULL,NULL,'CON1','MY PEN','2.0',0,'PRABATH'); +INSERT INTO IDN_OAUTH_CONSUMER_APPS ( APP_NAME , CALLBACK_URL , CONSUMER_KEY , CONSUMER_SECRET ,OAUTH_VERSION , TENANT_ID , USERNAME ) VALUES (NULL,NULL,'CON2','MY PEN','2.0',0,'PRABATH'); +INSERT INTO IDN_OAUTH_CONSUMER_APPS ( APP_NAME , CALLBACK_URL , CONSUMER_KEY , CONSUMER_SECRET ,OAUTH_VERSION , TENANT_ID , USERNAME ) VALUES (NULL,NULL,'CON3','MY PEN','2.0',0,'admin'); + +INSERT INTO IDN_OAUTH2_ACCESS_TOKEN ( ACCESS_TOKEN ,AUTHZ_USER , USER_TYPE , CONSUMER_KEY , REFRESH_TOKEN ,TIME_CREATED , TOKEN_SCOPE , TOKEN_STATE ,VALIDITY_PERIOD ) VALUES ('a1b2c3d4','UDAYANGA','DEVELOPER','CON1',NULL,'2012-01-01','SANDBOX','ACTIVE',1343714931875); +INSERT INTO IDN_OAUTH2_ACCESS_TOKEN ( ACCESS_TOKEN ,AUTHZ_USER , USER_TYPE , CONSUMER_KEY , REFRESH_TOKEN ,TIME_CREATED , TOKEN_SCOPE , TOKEN_STATE ,VALIDITY_PERIOD ) VALUES ('p1q2r3s4','UDAYANGA','DEVELOPER','CON1',NULL,'2012-01-01','PRODUCTION','ACTIVE',1343714931875); +INSERT INTO IDN_OAUTH2_ACCESS_TOKEN ( ACCESS_TOKEN ,AUTHZ_USER , USER_TYPE , CONSUMER_KEY , REFRESH_TOKEN ,TIME_CREATED , TOKEN_SCOPE , TOKEN_STATE ,VALIDITY_PERIOD ) VALUES ('test1','UDAYANGA','DEVELOPER','CON1',NULL,'2012-01-01','PRODUCTION','ACTIVE',1343714931875); +INSERT INTO IDN_OAUTH2_ACCESS_TOKEN ( ACCESS_TOKEN ,AUTHZ_USER , USER_TYPE , CONSUMER_KEY , REFRESH_TOKEN ,TIME_CREATED , TOKEN_SCOPE , TOKEN_STATE ,VALIDITY_PERIOD ) VALUES ('test2','UDAYANGA','DEVELOPER','CON2',NULL,'2012-01-01','SANDBOX','ACTIVE',1343714931875); +INSERT INTO IDN_OAUTH2_ACCESS_TOKEN ( ACCESS_TOKEN ,AUTHZ_USER , USER_TYPE , CONSUMER_KEY , REFRESH_TOKEN ,TIME_CREATED , TOKEN_SCOPE , TOKEN_STATE ,VALIDITY_PERIOD ) VALUES ('test3','UDAYANGA','DEVELOPER','CON3',NULL,'2012-01-01','PRODUCTION','ACTIVE',3600); + +SELECT * FROM AM_SUBSCRIBER; +SELECT * FROM AM_APPLICATION; +SELECT * FROM AM_SUBSCRIPTION; diff --git a/modules/distribution/src/repository/resources/dbscripts/apimgt/h2.sql b/modules/distribution/src/repository/resources/dbscripts/apimgt/h2.sql new file mode 100644 index 00000000..60d557f6 --- /dev/null +++ b/modules/distribution/src/repository/resources/dbscripts/apimgt/h2.sql @@ -0,0 +1,779 @@ +-- Start of IDN Tables -- +CREATE TABLE IF NOT EXISTS IDN_BASE_TABLE ( + PRODUCT_NAME VARCHAR (20), + PRIMARY KEY (PRODUCT_NAME) +); + +INSERT INTO IDN_BASE_TABLE values ('WSO2 Identity Server'); + +CREATE TABLE IF NOT EXISTS IDN_OAUTH_CONSUMER_APPS ( + ID INTEGER NOT NULL AUTO_INCREMENT, + CONSUMER_KEY VARCHAR (255), + CONSUMER_SECRET VARCHAR (512), + USERNAME VARCHAR (255), + TENANT_ID INTEGER DEFAULT 0, + USER_DOMAIN VARCHAR(50), + APP_NAME VARCHAR (255), + OAUTH_VERSION VARCHAR (128), + CALLBACK_URL VARCHAR (1024), + GRANT_TYPES VARCHAR (1024), + CONSTRAINT CONSUMER_KEY_CONSTRAINT UNIQUE (CONSUMER_KEY), + PRIMARY KEY (ID) +); + +CREATE TABLE IF NOT EXISTS IDN_OAUTH1A_REQUEST_TOKEN ( + REQUEST_TOKEN VARCHAR (512), + REQUEST_TOKEN_SECRET VARCHAR (512), + CONSUMER_KEY_ID INTEGER, + CALLBACK_URL VARCHAR (1024), + SCOPE VARCHAR(2048), + AUTHORIZED VARCHAR (128), + OAUTH_VERIFIER VARCHAR (512), + AUTHZ_USER VARCHAR (512), + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY (REQUEST_TOKEN), + FOREIGN KEY (CONSUMER_KEY_ID) REFERENCES IDN_OAUTH_CONSUMER_APPS(ID) ON DELETE CASCADE +); + +CREATE TABLE IF NOT EXISTS IDN_OAUTH1A_ACCESS_TOKEN ( + ACCESS_TOKEN VARCHAR (512), + ACCESS_TOKEN_SECRET VARCHAR (512), + CONSUMER_KEY_ID INTEGER, + SCOPE VARCHAR(2048), + AUTHZ_USER VARCHAR (512), + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY (ACCESS_TOKEN), + FOREIGN KEY (CONSUMER_KEY_ID) REFERENCES IDN_OAUTH_CONSUMER_APPS(ID) ON DELETE CASCADE +); + +CREATE TABLE IF NOT EXISTS IDN_OAUTH2_ACCESS_TOKEN ( + TOKEN_ID VARCHAR (255), + ACCESS_TOKEN VARCHAR (255), + REFRESH_TOKEN VARCHAR (255), + CONSUMER_KEY_ID INTEGER, + AUTHZ_USER VARCHAR (100), + TENANT_ID INTEGER, + USER_DOMAIN VARCHAR(50), + USER_TYPE VARCHAR (25), + GRANT_TYPE VARCHAR (50), + TIME_CREATED TIMESTAMP DEFAULT 0, + REFRESH_TOKEN_TIME_CREATED TIMESTAMP DEFAULT 0, + VALIDITY_PERIOD BIGINT, + REFRESH_TOKEN_VALIDITY_PERIOD BIGINT, + TOKEN_SCOPE_HASH VARCHAR (32), + TOKEN_STATE VARCHAR (25) DEFAULT 'ACTIVE', + TOKEN_STATE_ID VARCHAR (128) DEFAULT 'NONE', + PRIMARY KEY (TOKEN_ID), + FOREIGN KEY (CONSUMER_KEY_ID) REFERENCES IDN_OAUTH_CONSUMER_APPS(ID) ON DELETE CASCADE, + CONSTRAINT CON_APP_KEY UNIQUE (CONSUMER_KEY_ID,AUTHZ_USER,TENANT_ID,USER_DOMAIN,USER_TYPE,TOKEN_SCOPE_HASH, + TOKEN_STATE,TOKEN_STATE_ID) +); + +CREATE INDEX IDX_AT_CK_AU ON IDN_OAUTH2_ACCESS_TOKEN(CONSUMER_KEY_ID, AUTHZ_USER, TOKEN_STATE, USER_TYPE); + +CREATE INDEX IDX_TC ON IDN_OAUTH2_ACCESS_TOKEN(TIME_CREATED); + +CREATE TABLE IF NOT EXISTS IDN_OAUTH2_AUTHORIZATION_CODE ( + AUTHORIZATION_CODE VARCHAR (512), + CONSUMER_KEY_ID INTEGER, + CALLBACK_URL VARCHAR (1024), + SCOPE VARCHAR(2048), + AUTHZ_USER VARCHAR (100), + TENANT_ID INTEGER, + USER_DOMAIN VARCHAR(50), + TIME_CREATED TIMESTAMP, + VALIDITY_PERIOD BIGINT, + STATE VARCHAR (25) DEFAULT 'ACTIVE', + TOKEN_ID VARCHAR(255), + PRIMARY KEY (AUTHORIZATION_CODE), + FOREIGN KEY (CONSUMER_KEY_ID) REFERENCES IDN_OAUTH_CONSUMER_APPS(ID) ON DELETE CASCADE +); + +CREATE TABLE IF NOT EXISTS IDN_OAUTH2_ACCESS_TOKEN_SCOPE ( + TOKEN_ID VARCHAR (255), + TOKEN_SCOPE VARCHAR (60), + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY (TOKEN_ID, TOKEN_SCOPE), + FOREIGN KEY (TOKEN_ID) REFERENCES IDN_OAUTH2_ACCESS_TOKEN(TOKEN_ID) ON DELETE CASCADE +); + +CREATE TABLE IF NOT EXISTS IDN_OAUTH2_SCOPE ( + SCOPE_ID INTEGER NOT NULL AUTO_INCREMENT, + SCOPE_KEY VARCHAR(100) NOT NULL, + NAME VARCHAR(255) NULL, + DESCRIPTION VARCHAR(512) NULL, + TENANT_ID INTEGER NOT NULL DEFAULT 0, + ROLES VARCHAR (500) NULL, + PRIMARY KEY (SCOPE_ID) +); + +CREATE TABLE IF NOT EXISTS IDN_OAUTH2_RESOURCE_SCOPE ( + RESOURCE_PATH VARCHAR(255) NOT NULL, + SCOPE_ID INTEGER (11) NOT NULL, + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY (RESOURCE_PATH), + FOREIGN KEY (SCOPE_ID) REFERENCES IDN_OAUTH2_SCOPE (SCOPE_ID) +); + +CREATE TABLE IF NOT EXISTS IDN_SCIM_GROUP ( + ID INTEGER NOT NULL AUTO_INCREMENT, + TENANT_ID INTEGER NOT NULL, + ROLE_NAME VARCHAR(255) NOT NULL, + ATTR_NAME VARCHAR(1024) NOT NULL, + ATTR_VALUE VARCHAR(1024), + PRIMARY KEY (ID) +); + +CREATE TABLE IF NOT EXISTS IDN_OPENID_REMEMBER_ME ( + USER_NAME VARCHAR(255) NOT NULL, + TENANT_ID INTEGER DEFAULT 0, + COOKIE_VALUE VARCHAR(1024), + CREATED_TIME TIMESTAMP, + PRIMARY KEY (USER_NAME, TENANT_ID) +); + +CREATE TABLE IF NOT EXISTS IDN_OPENID_USER_RPS ( + USER_NAME VARCHAR(255) NOT NULL, + TENANT_ID INTEGER DEFAULT 0, + RP_URL VARCHAR(255) NOT NULL, + TRUSTED_ALWAYS VARCHAR(128) DEFAULT 'FALSE', + LAST_VISIT DATE NOT NULL, + VISIT_COUNT INTEGER DEFAULT 0, + DEFAULT_PROFILE_NAME VARCHAR(255) DEFAULT 'DEFAULT', + PRIMARY KEY (USER_NAME, TENANT_ID, RP_URL) +); + +CREATE TABLE IF NOT EXISTS IDN_OPENID_ASSOCIATIONS ( + HANDLE VARCHAR(255) NOT NULL, + ASSOC_TYPE VARCHAR(255) NOT NULL, + EXPIRE_IN TIMESTAMP NOT NULL, + MAC_KEY VARCHAR(255) NOT NULL, + ASSOC_STORE VARCHAR(128) DEFAULT 'SHARED', + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY (HANDLE) +); + +CREATE TABLE IDN_STS_STORE ( + ID INTEGER AUTO_INCREMENT, + TOKEN_ID VARCHAR(255) NOT NULL, + TOKEN_CONTENT BLOB NOT NULL, + CREATE_DATE TIMESTAMP NOT NULL, + EXPIRE_DATE TIMESTAMP NOT NULL, + STATE INTEGER DEFAULT 0, + PRIMARY KEY (ID) +); + +CREATE TABLE IDN_IDENTITY_USER_DATA ( + TENANT_ID INTEGER DEFAULT -1234, + USER_NAME VARCHAR(255) NOT NULL, + DATA_KEY VARCHAR(255) NOT NULL, + DATA_VALUE VARCHAR(255), + PRIMARY KEY (TENANT_ID, USER_NAME, DATA_KEY) +); + +CREATE TABLE IDN_IDENTITY_META_DATA ( + USER_NAME VARCHAR(255) NOT NULL, + TENANT_ID INTEGER DEFAULT -1234, + METADATA_TYPE VARCHAR(255) NOT NULL, + METADATA VARCHAR(255) NOT NULL, + VALID VARCHAR(255) NOT NULL, + PRIMARY KEY (TENANT_ID, USER_NAME, METADATA_TYPE,METADATA) +); + +CREATE TABLE IF NOT EXISTS IDN_THRIFT_SESSION ( + SESSION_ID VARCHAR(255) NOT NULL, + USER_NAME VARCHAR(255) NOT NULL, + CREATED_TIME VARCHAR(255) NOT NULL, + LAST_MODIFIED_TIME VARCHAR(255) NOT NULL, + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY (SESSION_ID) +); + +CREATE TABLE IDN_AUTH_SESSION_STORE ( + SESSION_ID VARCHAR (100) NOT NULL, + SESSION_TYPE VARCHAR(100) NOT NULL, + OPERATION VARCHAR(10) NOT NULL, + SESSION_OBJECT BLOB, + TIME_CREATED BIGINT, + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY (SESSION_ID, SESSION_TYPE, TIME_CREATED, OPERATION) +); +CREATE TABLE IF NOT EXISTS SP_APP ( + ID INTEGER NOT NULL AUTO_INCREMENT, + TENANT_ID INTEGER NOT NULL, + APP_NAME VARCHAR (255) NOT NULL , + USER_STORE VARCHAR (255) NOT NULL, + USERNAME VARCHAR (255) NOT NULL , + DESCRIPTION VARCHAR (1024), + ROLE_CLAIM VARCHAR (512), + AUTH_TYPE VARCHAR (255) NOT NULL, + PROVISIONING_USERSTORE_DOMAIN VARCHAR (512), + IS_LOCAL_CLAIM_DIALECT CHAR(1) DEFAULT '1', + IS_SEND_LOCAL_SUBJECT_ID CHAR(1) DEFAULT '0', + IS_SEND_AUTH_LIST_OF_IDPS CHAR(1) DEFAULT '0', + IS_USE_TENANT_DOMAIN_SUBJECT CHAR(1) DEFAULT '1', + IS_USE_USER_DOMAIN_SUBJECT CHAR(1) DEFAULT '1', + SUBJECT_CLAIM_URI VARCHAR (512), + IS_SAAS_APP CHAR(1) DEFAULT '0', + IS_DUMB_MODE CHAR(1) DEFAULT '0', + PRIMARY KEY (ID)); + +ALTER TABLE SP_APP ADD CONSTRAINT APPLICATION_NAME_CONSTRAINT UNIQUE(APP_NAME, TENANT_ID); + +CREATE TABLE IF NOT EXISTS SP_METADATA ( + ID INTEGER AUTO_INCREMENT, + SP_ID INTEGER, + NAME VARCHAR(255) NOT NULL, + VALUE VARCHAR(255) NOT NULL, + DISPLAY_NAME VARCHAR(255), + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY (ID), + CONSTRAINT SP_METADATA_CONSTRAINT UNIQUE (SP_ID, NAME), + FOREIGN KEY (SP_ID) REFERENCES SP_APP(ID) ON DELETE CASCADE); + +CREATE TABLE IF NOT EXISTS SP_INBOUND_AUTH ( + ID INTEGER NOT NULL AUTO_INCREMENT, + TENANT_ID INTEGER NOT NULL, + INBOUND_AUTH_KEY VARCHAR (255) NOT NULL, + INBOUND_AUTH_TYPE VARCHAR (255) NOT NULL, + PROP_NAME VARCHAR (255), + PROP_VALUE VARCHAR (1024) , + APP_ID INTEGER NOT NULL, + PRIMARY KEY (ID)); + +ALTER TABLE SP_INBOUND_AUTH ADD CONSTRAINT APPLICATION_ID_CONSTRAINT FOREIGN KEY (APP_ID) REFERENCES SP_APP (ID) ON DELETE CASCADE; + +CREATE TABLE IF NOT EXISTS SP_AUTH_STEP ( + ID INTEGER NOT NULL AUTO_INCREMENT, + TENANT_ID INTEGER NOT NULL, + STEP_ORDER INTEGER DEFAULT 1, + APP_ID INTEGER NOT NULL , + IS_SUBJECT_STEP CHAR(1) DEFAULT '0', + IS_ATTRIBUTE_STEP CHAR(1) DEFAULT '0', + PRIMARY KEY (ID)); + +ALTER TABLE SP_AUTH_STEP ADD CONSTRAINT APPLICATION_ID_CONSTRAINT_STEP FOREIGN KEY (APP_ID) REFERENCES SP_APP (ID) ON DELETE CASCADE; + +CREATE TABLE IF NOT EXISTS SP_FEDERATED_IDP ( + ID INTEGER NOT NULL, + TENANT_ID INTEGER NOT NULL, + AUTHENTICATOR_ID INTEGER NOT NULL, + PRIMARY KEY (ID, AUTHENTICATOR_ID)); + +ALTER TABLE SP_FEDERATED_IDP ADD CONSTRAINT STEP_ID_CONSTRAINT FOREIGN KEY (ID) REFERENCES SP_AUTH_STEP (ID) ON DELETE CASCADE; + +CREATE TABLE IF NOT EXISTS SP_CLAIM_MAPPING ( + ID INTEGER NOT NULL AUTO_INCREMENT, + TENANT_ID INTEGER NOT NULL, + IDP_CLAIM VARCHAR (512) NOT NULL , + SP_CLAIM VARCHAR (512) NOT NULL , + APP_ID INTEGER NOT NULL, + IS_REQUESTED VARCHAR(128) DEFAULT '0', + DEFAULT_VALUE VARCHAR(255), + PRIMARY KEY (ID)); + +ALTER TABLE SP_CLAIM_MAPPING ADD CONSTRAINT CLAIMID_APPID_CONSTRAINT FOREIGN KEY (APP_ID) REFERENCES SP_APP (ID) ON DELETE CASCADE; + +CREATE TABLE IF NOT EXISTS SP_ROLE_MAPPING ( + ID INTEGER NOT NULL AUTO_INCREMENT, + TENANT_ID INTEGER NOT NULL, + IDP_ROLE VARCHAR (255) NOT NULL , + SP_ROLE VARCHAR (255) NOT NULL , + APP_ID INTEGER NOT NULL, + PRIMARY KEY (ID)); + +ALTER TABLE SP_ROLE_MAPPING ADD CONSTRAINT ROLEID_APPID_CONSTRAINT FOREIGN KEY (APP_ID) REFERENCES SP_APP (ID) ON DELETE CASCADE; + +CREATE TABLE IF NOT EXISTS SP_REQ_PATH_AUTHENTICATOR ( + ID INTEGER NOT NULL AUTO_INCREMENT, + TENANT_ID INTEGER NOT NULL, + AUTHENTICATOR_NAME VARCHAR (255) NOT NULL , + APP_ID INTEGER NOT NULL, + PRIMARY KEY (ID)); + +ALTER TABLE SP_REQ_PATH_AUTHENTICATOR ADD CONSTRAINT REQ_AUTH_APPID_CONSTRAINT FOREIGN KEY (APP_ID) REFERENCES SP_APP (ID) ON DELETE CASCADE; + +CREATE TABLE IF NOT EXISTS SP_PROVISIONING_CONNECTOR ( + ID INTEGER NOT NULL AUTO_INCREMENT, + TENANT_ID INTEGER NOT NULL, + IDP_NAME VARCHAR (255) NOT NULL , + CONNECTOR_NAME VARCHAR (255) NOT NULL , + APP_ID INTEGER NOT NULL, + IS_JIT_ENABLED CHAR(1) NOT NULL DEFAULT '0', + BLOCKING CHAR(1) NOT NULL DEFAULT '0', + PRIMARY KEY (ID)); + +ALTER TABLE SP_PROVISIONING_CONNECTOR ADD CONSTRAINT PRO_CONNECTOR_APPID_CONSTRAINT FOREIGN KEY (APP_ID) REFERENCES SP_APP (ID) ON DELETE CASCADE; + +CREATE TABLE IF NOT EXISTS IDP ( + ID INTEGER AUTO_INCREMENT, + TENANT_ID INTEGER, + NAME VARCHAR(254) NOT NULL, + IS_ENABLED CHAR(1) NOT NULL DEFAULT '1', + IS_PRIMARY CHAR(1) NOT NULL DEFAULT '0', + HOME_REALM_ID VARCHAR(254), + IMAGE MEDIUMBLOB, + CERTIFICATE BLOB, + ALIAS VARCHAR(254), + INBOUND_PROV_ENABLED CHAR (1) NOT NULL DEFAULT '0', + INBOUND_PROV_USER_STORE_ID VARCHAR(254), + USER_CLAIM_URI VARCHAR(254), + ROLE_CLAIM_URI VARCHAR(254), + DESCRIPTION VARCHAR (1024), + DEFAULT_AUTHENTICATOR_NAME VARCHAR(254), + DEFAULT_PRO_CONNECTOR_NAME VARCHAR(254), + PROVISIONING_ROLE VARCHAR(128), + IS_FEDERATION_HUB CHAR(1) NOT NULL DEFAULT '0', + IS_LOCAL_CLAIM_DIALECT CHAR(1) NOT NULL DEFAULT '0', + DISPLAY_NAME VARCHAR(255), + PRIMARY KEY (ID), + UNIQUE (TENANT_ID, NAME)); + +INSERT INTO IDP (TENANT_ID, NAME, HOME_REALM_ID) VALUES (-1234, 'LOCAL', 'localhost'); + +CREATE TABLE IF NOT EXISTS IDP_ROLE ( + ID INTEGER AUTO_INCREMENT, + IDP_ID INTEGER, + TENANT_ID INTEGER, + ROLE VARCHAR(254), + PRIMARY KEY (ID), + UNIQUE (IDP_ID, ROLE), + FOREIGN KEY (IDP_ID) REFERENCES IDP(ID) ON DELETE CASCADE); + +CREATE TABLE IF NOT EXISTS IDP_ROLE_MAPPING ( + ID INTEGER AUTO_INCREMENT, + IDP_ROLE_ID INTEGER, + TENANT_ID INTEGER, + USER_STORE_ID VARCHAR (253), + LOCAL_ROLE VARCHAR(253), + PRIMARY KEY (ID), + UNIQUE (IDP_ROLE_ID, TENANT_ID, USER_STORE_ID, LOCAL_ROLE), + FOREIGN KEY (IDP_ROLE_ID) REFERENCES IDP_ROLE(ID) ON DELETE CASCADE); + +CREATE TABLE IF NOT EXISTS IDP_CLAIM ( + ID INTEGER AUTO_INCREMENT, + IDP_ID INTEGER, + TENANT_ID INTEGER, + CLAIM VARCHAR(254), + PRIMARY KEY (ID), + UNIQUE (IDP_ID, CLAIM), + FOREIGN KEY (IDP_ID) REFERENCES IDP(ID) ON DELETE CASCADE); + +CREATE TABLE IF NOT EXISTS IDP_CLAIM_MAPPING ( + ID INTEGER AUTO_INCREMENT, + IDP_CLAIM_ID INTEGER, + TENANT_ID INTEGER, + LOCAL_CLAIM VARCHAR(253), + DEFAULT_VALUE VARCHAR(255), + IS_REQUESTED VARCHAR(128) DEFAULT '0', + PRIMARY KEY (ID), + UNIQUE (IDP_CLAIM_ID, TENANT_ID, LOCAL_CLAIM), + FOREIGN KEY (IDP_CLAIM_ID) REFERENCES IDP_CLAIM(ID) ON DELETE CASCADE); + +CREATE TABLE IF NOT EXISTS IDP_AUTHENTICATOR ( + ID INTEGER AUTO_INCREMENT, + TENANT_ID INTEGER, + IDP_ID INTEGER, + NAME VARCHAR(255) NOT NULL, + IS_ENABLED CHAR (1) DEFAULT '1', + DISPLAY_NAME VARCHAR(255), + PRIMARY KEY (ID), + UNIQUE (TENANT_ID, IDP_ID, NAME), + FOREIGN KEY (IDP_ID) REFERENCES IDP(ID) ON DELETE CASCADE); + +INSERT INTO IDP_AUTHENTICATOR (TENANT_ID, IDP_ID, NAME) VALUES (-1234, 1, 'samlsso'); +INSERT INTO IDP_AUTHENTICATOR (TENANT_ID, IDP_ID, NAME) VALUES (-1234, 1, 'IDPProperties'); +INSERT INTO IDP_AUTHENTICATOR (TENANT_ID, IDP_ID, NAME) VALUES (-1234, 1, 'passivests'); + +CREATE TABLE IF NOT EXISTS IDP_METADATA ( + ID INTEGER AUTO_INCREMENT, + IDP_ID INTEGER, + NAME VARCHAR(255) NOT NULL, + VALUE VARCHAR(255) NOT NULL, + DISPLAY_NAME VARCHAR(255), + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY (ID), + CONSTRAINT IDP_METADATA_CONSTRAINT UNIQUE (IDP_ID, NAME), + FOREIGN KEY (IDP_ID) REFERENCES IDP(ID) ON DELETE CASCADE); + +INSERT INTO IDP_METADATA (IDP_ID, NAME, VALUE, DISPLAY_NAME) VALUES (1, 'SessionIdleTimeout', '20160', 'Session Idle Timeout'); +INSERT INTO IDP_METADATA (IDP_ID, NAME, VALUE, DISPLAY_NAME) VALUES (1, 'RememberMeTimeout', '15', 'RememberMe Timeout'); + +CREATE TABLE IF NOT EXISTS IDP_AUTHENTICATOR_PROPERTY ( + ID INTEGER AUTO_INCREMENT, + TENANT_ID INTEGER, + AUTHENTICATOR_ID INTEGER, + PROPERTY_KEY VARCHAR(255) NOT NULL, + PROPERTY_VALUE VARCHAR(2047), + IS_SECRET CHAR (1) DEFAULT '0', + PRIMARY KEY (ID), + UNIQUE (TENANT_ID, AUTHENTICATOR_ID, PROPERTY_KEY), + FOREIGN KEY (AUTHENTICATOR_ID) REFERENCES IDP_AUTHENTICATOR(ID) ON DELETE CASCADE); + +INSERT INTO IDP_AUTHENTICATOR_PROPERTY (TENANT_ID, AUTHENTICATOR_ID, PROPERTY_KEY,PROPERTY_VALUE, IS_SECRET ) VALUES (-1234, 1 , 'IdPEntityId', 'localhost', '0'); +INSERT INTO IDP_AUTHENTICATOR_PROPERTY (TENANT_ID, AUTHENTICATOR_ID, PROPERTY_KEY,PROPERTY_VALUE, IS_SECRET ) VALUES (-1234, 3 , 'IdPEntityId', 'localhost', '0'); + +CREATE TABLE IF NOT EXISTS IDP_PROVISIONING_CONFIG ( + ID INTEGER AUTO_INCREMENT, + TENANT_ID INTEGER, + IDP_ID INTEGER, + PROVISIONING_CONNECTOR_TYPE VARCHAR(255) NOT NULL, + IS_ENABLED CHAR (1) DEFAULT '0', + IS_BLOCKING CHAR (1) DEFAULT '0', + PRIMARY KEY (ID), + UNIQUE (TENANT_ID, IDP_ID, PROVISIONING_CONNECTOR_TYPE), + FOREIGN KEY (IDP_ID) REFERENCES IDP(ID) ON DELETE CASCADE); + +CREATE TABLE IF NOT EXISTS IDP_PROV_CONFIG_PROPERTY ( + ID INTEGER AUTO_INCREMENT, + TENANT_ID INTEGER, + PROVISIONING_CONFIG_ID INTEGER, + PROPERTY_KEY VARCHAR(255) NOT NULL, + PROPERTY_VALUE VARCHAR(2048), + PROPERTY_BLOB_VALUE BLOB, + PROPERTY_TYPE CHAR(32) NOT NULL, + IS_SECRET CHAR (1) DEFAULT '0', + PRIMARY KEY (ID), + UNIQUE (TENANT_ID, PROVISIONING_CONFIG_ID, PROPERTY_KEY), + FOREIGN KEY (PROVISIONING_CONFIG_ID) REFERENCES IDP_PROVISIONING_CONFIG(ID) ON DELETE CASCADE); + +CREATE TABLE IF NOT EXISTS IDP_PROVISIONING_ENTITY ( + ID INTEGER AUTO_INCREMENT, + PROVISIONING_CONFIG_ID INTEGER, + ENTITY_TYPE VARCHAR(255) NOT NULL, + ENTITY_LOCAL_USERSTORE VARCHAR(255) NOT NULL, + ENTITY_NAME VARCHAR(255) NOT NULL, + ENTITY_VALUE VARCHAR(255), + TENANT_ID INTEGER, + ENTITY_LOCAL_ID VARCHAR(255), + PRIMARY KEY (ID), + UNIQUE (ENTITY_TYPE, TENANT_ID, ENTITY_LOCAL_USERSTORE, ENTITY_NAME, PROVISIONING_CONFIG_ID), + UNIQUE (PROVISIONING_CONFIG_ID, ENTITY_TYPE, ENTITY_VALUE), + FOREIGN KEY (PROVISIONING_CONFIG_ID) REFERENCES IDP_PROVISIONING_CONFIG(ID) ON DELETE CASCADE); + +CREATE TABLE IF NOT EXISTS IDP_LOCAL_CLAIM ( + ID INTEGER AUTO_INCREMENT, + TENANT_ID INTEGER, + IDP_ID INTEGER, + CLAIM_URI VARCHAR(255) NOT NULL, + DEFAULT_VALUE VARCHAR(255), + IS_REQUESTED VARCHAR(128) DEFAULT '0', + PRIMARY KEY (ID), + UNIQUE (TENANT_ID, IDP_ID, CLAIM_URI), + FOREIGN KEY (IDP_ID) REFERENCES IDP(ID) ON DELETE CASCADE); + +CREATE TABLE IF NOT EXISTS IDN_ASSOCIATED_ID ( + ID INTEGER AUTO_INCREMENT, + IDP_USER_ID VARCHAR(255) NOT NULL, + TENANT_ID INTEGER DEFAULT -1234, + IDP_ID INTEGER NOT NULL, + DOMAIN_NAME VARCHAR(255) NOT NULL, + USER_NAME VARCHAR(255) NOT NULL, + PRIMARY KEY (ID), + UNIQUE(IDP_USER_ID, TENANT_ID, IDP_ID), + FOREIGN KEY (IDP_ID) REFERENCES IDP(ID) ON DELETE CASCADE +); + +CREATE TABLE IF NOT EXISTS IDN_USER_ACCOUNT_ASSOCIATION ( + ASSOCIATION_KEY VARCHAR(255) NOT NULL, + TENANT_ID INTEGER, + DOMAIN_NAME VARCHAR(255) NOT NULL, + USER_NAME VARCHAR(255) NOT NULL, + PRIMARY KEY (TENANT_ID, DOMAIN_NAME, USER_NAME)); + +CREATE TABLE IF NOT EXISTS FIDO_DEVICE_STORE ( + TENANT_ID INTEGER, + DOMAIN_NAME VARCHAR(255) NOT NULL, + USER_NAME VARCHAR(45) NOT NULL, + TIME_REGISTERED TIMESTAMP, + KEY_HANDLE VARCHAR(200) NOT NULL, + DEVICE_DATA LONGVARCHAR NOT NULL, + PRIMARY KEY (TENANT_ID, DOMAIN_NAME, USER_NAME, KEY_HANDLE)); + +CREATE TABLE IF NOT EXISTS WF_REQUEST ( + UUID VARCHAR (45), + CREATED_BY VARCHAR (255), + TENANT_ID INTEGER DEFAULT -1, + OPERATION_TYPE VARCHAR (50), + CREATED_AT TIMESTAMP, + UPDATED_AT TIMESTAMP, + STATUS VARCHAR (30), + REQUEST BLOB, + PRIMARY KEY (UUID) +); + +CREATE TABLE IF NOT EXISTS WF_BPS_PROFILE ( + PROFILE_NAME VARCHAR(45), + HOST_URL_MANAGER VARCHAR(45), + HOST_URL_WORKER VARCHAR(45), + USERNAME VARCHAR(45), + PASSWORD VARCHAR(255), + CALLBACK_HOST VARCHAR (45), + CALLBACK_USERNAME VARCHAR (45), + CALLBACK_PASSWORD VARCHAR (255), + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY (PROFILE_NAME, TENANT_ID) +); + +CREATE TABLE IF NOT EXISTS WF_WORKFLOW( + ID VARCHAR (45), + WF_NAME VARCHAR (45), + DESCRIPTION VARCHAR (255), + TEMPLATE_ID VARCHAR (45), + IMPL_ID VARCHAR (45), + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY (ID) +); + +CREATE TABLE IF NOT EXISTS WF_WORKFLOW_ASSOCIATION( + ID INTEGER NOT NULL AUTO_INCREMENT, + ASSOC_NAME VARCHAR (45), + EVENT_ID VARCHAR(45), + ASSOC_CONDITION VARCHAR (2000), + WORKFLOW_ID VARCHAR (45), + IS_ENABLED CHAR (1) DEFAULT '1', + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY(ID), + FOREIGN KEY (WORKFLOW_ID) REFERENCES WF_WORKFLOW(ID)ON DELETE CASCADE +); + +CREATE TABLE IF NOT EXISTS WF_WORKFLOW_CONFIG_PARAM( + WORKFLOW_ID VARCHAR (45), + PARAM_NAME VARCHAR (45), + PARAM_VALUE VARCHAR (1000), + PARAM_QNAME VARCHAR (45), + PARAM_HOLDER VARCHAR (45), + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY (WORKFLOW_ID, PARAM_NAME, PARAM_QNAME, PARAM_HOLDER), + FOREIGN KEY (WORKFLOW_ID) REFERENCES WF_WORKFLOW(ID)ON DELETE CASCADE +); + +CREATE TABLE IF NOT EXISTS WF_REQUEST_ENTITY_RELATIONSHIP( + REQUEST_ID VARCHAR (45), + ENTITY_NAME VARCHAR (255), + ENTITY_TYPE VARCHAR (50), + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY(REQUEST_ID, ENTITY_NAME, ENTITY_TYPE, TENANT_ID), + FOREIGN KEY (REQUEST_ID) REFERENCES WF_REQUEST(UUID)ON DELETE CASCADE +); + +CREATE TABLE IF NOT EXISTS WF_WORKFLOW_REQUEST_RELATION( + RELATIONSHIP_ID VARCHAR (45), + WORKFLOW_ID VARCHAR (45), + REQUEST_ID VARCHAR (45), + UPDATED_AT TIMESTAMP, + STATUS VARCHAR (30), + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY (RELATIONSHIP_ID), + FOREIGN KEY (WORKFLOW_ID) REFERENCES WF_WORKFLOW(ID)ON DELETE CASCADE, + FOREIGN KEY (REQUEST_ID) REFERENCES WF_REQUEST(UUID)ON DELETE CASCADE +); + +-- Start of API-MGT Tables -- + +CREATE TABLE IF NOT EXISTS AM_SUBSCRIBER ( + SUBSCRIBER_ID INTEGER AUTO_INCREMENT, + USER_ID VARCHAR(255) NOT NULL, + TENANT_ID INTEGER NOT NULL, + EMAIL_ADDRESS VARCHAR(256) NULL, + DATE_SUBSCRIBED TIMESTAMP NOT NULL, + PRIMARY KEY (SUBSCRIBER_ID), + CREATED_BY VARCHAR(100), + CREATED_TIME TIMESTAMP, + UPDATED_BY VARCHAR(100), + UPDATED_TIME TIMESTAMP, + UNIQUE (TENANT_ID,USER_ID) +); + +CREATE TABLE IF NOT EXISTS AM_APPLICATION ( + APPLICATION_ID INTEGER AUTO_INCREMENT, + NAME VARCHAR(100), + SUBSCRIBER_ID INTEGER, + APPLICATION_TIER VARCHAR(50) DEFAULT 'Unlimited', + CALLBACK_URL VARCHAR(512), + DESCRIPTION VARCHAR(512), + APPLICATION_STATUS VARCHAR(50) DEFAULT 'APPROVED', + GROUP_ID VARCHAR(100), + CREATED_BY VARCHAR(100), + CREATED_TIME TIMESTAMP, + UPDATED_BY VARCHAR(100), + UPDATED_TIME TIMESTAMP, + UUID VARCHAR(256), + FOREIGN KEY(SUBSCRIBER_ID) REFERENCES AM_SUBSCRIBER(SUBSCRIBER_ID) ON UPDATE CASCADE ON DELETE RESTRICT, + PRIMARY KEY(APPLICATION_ID), + UNIQUE (NAME,SUBSCRIBER_ID), + UNIQUE (UUID) +); + +CREATE TABLE IF NOT EXISTS AM_API ( + API_ID INTEGER AUTO_INCREMENT, + API_PROVIDER VARCHAR(256), + API_NAME VARCHAR(256), + API_VERSION VARCHAR(30), + CONTEXT VARCHAR(256), + CONTEXT_TEMPLATE VARCHAR(256), + PRIMARY KEY(API_ID), + CREATED_BY VARCHAR(100), + CREATED_TIME TIMESTAMP, + UPDATED_BY VARCHAR(100), + UPDATED_TIME TIMESTAMP, + UNIQUE (API_PROVIDER,API_NAME,API_VERSION) +); + +CREATE TABLE IF NOT EXISTS AM_API_URL_MAPPING ( + URL_MAPPING_ID INTEGER AUTO_INCREMENT, + API_ID INTEGER NOT NULL, + HTTP_METHOD VARCHAR(20) NULL, + AUTH_SCHEME VARCHAR(50) NULL, + URL_PATTERN VARCHAR(512) NULL, + THROTTLING_TIER varchar(512) DEFAULT NULL, + MEDIATION_SCRIPT BLOB DEFAULT NULL, + PRIMARY KEY(URL_MAPPING_ID) +); + + +CREATE TABLE IF NOT EXISTS AM_SUBSCRIPTION ( + SUBSCRIPTION_ID INTEGER AUTO_INCREMENT, + TIER_ID VARCHAR(50), + API_ID INTEGER, + LAST_ACCESSED TIMESTAMP NULL, + APPLICATION_ID INTEGER, + SUB_STATUS VARCHAR(50), + SUBS_CREATE_STATE VARCHAR(50) DEFAULT 'SUBSCRIBE', + CREATED_BY VARCHAR(100), + CREATED_TIME TIMESTAMP, + UPDATED_BY VARCHAR(100), + UPDATED_TIME TIMESTAMP, + UUID VARCHAR(256), + FOREIGN KEY(APPLICATION_ID) REFERENCES AM_APPLICATION(APPLICATION_ID) ON UPDATE CASCADE ON DELETE RESTRICT, + FOREIGN KEY(API_ID) REFERENCES AM_API(API_ID) ON UPDATE CASCADE ON DELETE RESTRICT, + PRIMARY KEY (SUBSCRIPTION_ID), + UNIQUE (UUID) +); + +CREATE TABLE IF NOT EXISTS AM_SUBSCRIPTION_KEY_MAPPING ( + SUBSCRIPTION_ID INTEGER, + ACCESS_TOKEN VARCHAR(512), + KEY_TYPE VARCHAR(512) NOT NULL, + FOREIGN KEY(SUBSCRIPTION_ID) REFERENCES AM_SUBSCRIPTION(SUBSCRIPTION_ID) ON UPDATE CASCADE ON DELETE RESTRICT, + PRIMARY KEY(SUBSCRIPTION_ID,ACCESS_TOKEN) +); + +CREATE TABLE IF NOT EXISTS AM_APPLICATION_KEY_MAPPING ( + APPLICATION_ID INTEGER, + CONSUMER_KEY VARCHAR(512), + KEY_TYPE VARCHAR(512) NOT NULL, + STATE VARCHAR(30) NOT NULL, + CREATE_MODE VARCHAR(30) DEFAULT 'CREATED', + FOREIGN KEY(APPLICATION_ID) REFERENCES AM_APPLICATION(APPLICATION_ID) ON UPDATE CASCADE ON DELETE RESTRICT, + PRIMARY KEY(APPLICATION_ID,KEY_TYPE) +); + +CREATE TABLE IF NOT EXISTS AM_API_LC_EVENT ( + EVENT_ID INTEGER AUTO_INCREMENT, + API_ID INTEGER NOT NULL, + PREVIOUS_STATE VARCHAR(50), + NEW_STATE VARCHAR(50) NOT NULL, + USER_ID VARCHAR(255) NOT NULL, + TENANT_ID INTEGER NOT NULL, + EVENT_DATE TIMESTAMP NOT NULL, + FOREIGN KEY(API_ID) REFERENCES AM_API(API_ID) ON UPDATE CASCADE ON DELETE RESTRICT, + PRIMARY KEY (EVENT_ID) +); + +CREATE TABLE AM_APP_KEY_DOMAIN_MAPPING ( + CONSUMER_KEY VARCHAR(255), + AUTHZ_DOMAIN VARCHAR(255) DEFAULT 'ALL', + PRIMARY KEY (CONSUMER_KEY,AUTHZ_DOMAIN) +); + +CREATE TABLE IF NOT EXISTS AM_API_COMMENTS ( + COMMENT_ID INTEGER AUTO_INCREMENT, + COMMENT_TEXT VARCHAR(512), + COMMENTED_USER VARCHAR(255), + DATE_COMMENTED TIMESTAMP NOT NULL, + API_ID INTEGER NOT NULL, + FOREIGN KEY(API_ID) REFERENCES AM_API(API_ID) ON UPDATE CASCADE ON DELETE RESTRICT, + PRIMARY KEY (COMMENT_ID) +); + +CREATE TABLE IF NOT EXISTS AM_API_RATINGS( + RATING_ID INTEGER AUTO_INCREMENT, + API_ID INTEGER, + RATING INTEGER, + SUBSCRIBER_ID INTEGER, + FOREIGN KEY(API_ID) REFERENCES AM_API(API_ID) ON UPDATE CASCADE ON DELETE RESTRICT, + FOREIGN KEY(SUBSCRIBER_ID) REFERENCES AM_SUBSCRIBER(SUBSCRIBER_ID) ON UPDATE CASCADE ON DELETE RESTRICT, + PRIMARY KEY (RATING_ID) +); + +CREATE TABLE IF NOT EXISTS AM_TIER_PERMISSIONS ( + TIER_PERMISSIONS_ID INTEGER AUTO_INCREMENT, + TIER VARCHAR(50) NOT NULL, + PERMISSIONS_TYPE VARCHAR(50) NOT NULL, + ROLES VARCHAR(512) NOT NULL, + TENANT_ID INTEGER NOT NULL, + PRIMARY KEY(TIER_PERMISSIONS_ID) +); + +CREATE TABLE IF NOT EXISTS AM_EXTERNAL_STORES( + APISTORE_ID INTEGER AUTO_INCREMENT, + API_ID INTEGER, + STORE_ID VARCHAR(255) NOT NULL, + STORE_DISPLAY_NAME VARCHAR(255) NOT NULL, + STORE_ENDPOINT VARCHAR(255) NOT NULL, + STORE_TYPE VARCHAR(255) NOT NULL, + FOREIGN KEY(API_ID) REFERENCES AM_API(API_ID) ON UPDATE CASCADE ON DELETE RESTRICT, + PRIMARY KEY (APISTORE_ID) +); + +CREATE TABLE IF NOT EXISTS AM_WORKFLOWS( + WF_ID INTEGER AUTO_INCREMENT, + WF_REFERENCE VARCHAR(255) NOT NULL, + WF_TYPE VARCHAR(255) NOT NULL, + WF_STATUS VARCHAR(255) NOT NULL, + WF_CREATED_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + WF_UPDATED_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP , + WF_STATUS_DESC VARCHAR(1000), + TENANT_ID INTEGER, + TENANT_DOMAIN VARCHAR(255), + WF_EXTERNAL_REFERENCE VARCHAR(255) NOT NULL, + PRIMARY KEY (WF_ID), + UNIQUE (WF_EXTERNAL_REFERENCE) +); + +CREATE TABLE IF NOT EXISTS AM_APPLICATION_REGISTRATION ( + REG_ID INT AUTO_INCREMENT, + SUBSCRIBER_ID INT, + WF_REF VARCHAR(255) NOT NULL, + APP_ID INT, + TOKEN_TYPE VARCHAR(30), + TOKEN_SCOPE VARCHAR(256) DEFAULT 'default', + INPUTS VARCHAR(1000), + ALLOWED_DOMAINS VARCHAR(256), + VALIDITY_PERIOD BIGINT, + UNIQUE (SUBSCRIBER_ID,APP_ID,TOKEN_TYPE), + FOREIGN KEY(SUBSCRIBER_ID) REFERENCES AM_SUBSCRIBER(SUBSCRIBER_ID) ON UPDATE CASCADE ON DELETE RESTRICT, + FOREIGN KEY(APP_ID) REFERENCES AM_APPLICATION(APPLICATION_ID) ON UPDATE CASCADE ON DELETE RESTRICT, + PRIMARY KEY (REG_ID) +); + +CREATE TABLE IF NOT EXISTS AM_API_SCOPES ( + API_ID INTEGER NOT NULL, + SCOPE_ID INTEGER NOT NULL, + FOREIGN KEY (API_ID) REFERENCES AM_API (API_ID) ON DELETE CASCADE ON UPDATE CASCADE, + FOREIGN KEY (SCOPE_ID) REFERENCES IDN_OAUTH2_SCOPE (SCOPE_ID) ON DELETE CASCADE ON UPDATE CASCADE +); + +CREATE TABLE IF NOT EXISTS AM_API_DEFAULT_VERSION ( + DEFAULT_VERSION_ID INT AUTO_INCREMENT, + API_NAME VARCHAR(256) NOT NULL , + API_PROVIDER VARCHAR(256) NOT NULL , + DEFAULT_API_VERSION VARCHAR(30) , + PUBLISHED_DEFAULT_API_VERSION VARCHAR(30) , + PRIMARY KEY (DEFAULT_VERSION_ID) +); + +CREATE INDEX IDX_SUB_APP_ID ON AM_SUBSCRIPTION (APPLICATION_ID, SUBSCRIPTION_ID); + +-- End of API-MGT Tables -- diff --git a/modules/distribution/src/repository/resources/dbscripts/apimgt/mssql.sql b/modules/distribution/src/repository/resources/dbscripts/apimgt/mssql.sql new file mode 100644 index 00000000..3500f4a1 --- /dev/null +++ b/modules/distribution/src/repository/resources/dbscripts/apimgt/mssql.sql @@ -0,0 +1,858 @@ +-- Start of IDN Tables -- +IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[IDN_BASE_TABLE]') AND TYPE IN (N'U')) +CREATE TABLE IDN_BASE_TABLE ( + PRODUCT_NAME VARCHAR(20), + PRIMARY KEY (PRODUCT_NAME) +); + +INSERT INTO IDN_BASE_TABLE values ('WSO2 Identity Server'); + +IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[IDN_OAUTH_CONSUMER_APPS]') AND TYPE IN (N'U')) +CREATE TABLE IDN_OAUTH_CONSUMER_APPS ( + ID INTEGER IDENTITY, + CONSUMER_KEY VARCHAR(255), + CONSUMER_SECRET VARCHAR(512), + USERNAME VARCHAR(255), + TENANT_ID INTEGER DEFAULT 0, + USER_DOMAIN VARCHAR(50), + APP_NAME VARCHAR(255), + OAUTH_VERSION VARCHAR(128), + CALLBACK_URL VARCHAR(1024), + GRANT_TYPES VARCHAR(1024), + CONSTRAINT CONSUMER_KEY_CONSTRAINT UNIQUE (CONSUMER_KEY), + PRIMARY KEY (ID) +); + +IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[IDN_OAUTH1A_REQUEST_TOKEN]') AND TYPE IN (N'U')) +CREATE TABLE IDN_OAUTH1A_REQUEST_TOKEN ( + REQUEST_TOKEN VARCHAR(512), + REQUEST_TOKEN_SECRET VARCHAR(512), + CONSUMER_KEY_ID INTEGER, + CALLBACK_URL VARCHAR(1024), + SCOPE VARCHAR(2048), + AUTHORIZED VARCHAR(128), + OAUTH_VERIFIER VARCHAR(512), + AUTHZ_USER VARCHAR(512), + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY (REQUEST_TOKEN), + FOREIGN KEY (CONSUMER_KEY_ID) REFERENCES IDN_OAUTH_CONSUMER_APPS(ID) ON DELETE CASCADE +); + +IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[IDN_OAUTH1A_ACCESS_TOKEN]') AND TYPE IN (N'U')) +CREATE TABLE IDN_OAUTH1A_ACCESS_TOKEN ( + ACCESS_TOKEN VARCHAR(512), + ACCESS_TOKEN_SECRET VARCHAR(512), + CONSUMER_KEY_ID INTEGER, + SCOPE VARCHAR(2048), + AUTHZ_USER VARCHAR(512), + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY (ACCESS_TOKEN), + FOREIGN KEY (CONSUMER_KEY_ID) REFERENCES IDN_OAUTH_CONSUMER_APPS(ID) ON DELETE CASCADE +); + +IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[IDN_OAUTH2_ACCESS_TOKEN]') AND TYPE IN (N'U')) +CREATE TABLE IDN_OAUTH2_ACCESS_TOKEN ( + TOKEN_ID VARCHAR (255), + ACCESS_TOKEN VARCHAR(255), + REFRESH_TOKEN VARCHAR(255), + CONSUMER_KEY_ID INTEGER, + AUTHZ_USER VARCHAR (100), + TENANT_ID INTEGER, + USER_DOMAIN VARCHAR(50), + USER_TYPE VARCHAR (25), + GRANT_TYPE VARCHAR (50), + TIME_CREATED DATETIME, + REFRESH_TOKEN_TIME_CREATED DATETIME, + VALIDITY_PERIOD BIGINT, + REFRESH_TOKEN_VALIDITY_PERIOD BIGINT, + TOKEN_SCOPE_HASH VARCHAR(32), + TOKEN_STATE VARCHAR(25) DEFAULT 'ACTIVE', + TOKEN_STATE_ID VARCHAR (128) DEFAULT 'NONE', + PRIMARY KEY (TOKEN_ID), + FOREIGN KEY (CONSUMER_KEY_ID) REFERENCES IDN_OAUTH_CONSUMER_APPS(ID) ON DELETE CASCADE, + CONSTRAINT CON_APP_KEY UNIQUE (CONSUMER_KEY_ID,AUTHZ_USER,TENANT_ID,USER_DOMAIN,USER_TYPE,TOKEN_SCOPE_HASH, + TOKEN_STATE,TOKEN_STATE_ID) +); + +CREATE INDEX IDX_AT_CK_AU ON IDN_OAUTH2_ACCESS_TOKEN(CONSUMER_KEY_ID, AUTHZ_USER, TOKEN_STATE, USER_TYPE); + +CREATE INDEX IDX_TC ON IDN_OAUTH2_ACCESS_TOKEN(TIME_CREATED); + +IF EXISTS (SELECT NAME FROM SYSINDEXES WHERE NAME = 'IDX_AT_CK_AU') +DROP INDEX IDN_OAUTH2_ACCESS_TOKEN.IDX_AT_CK_AU + +IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[IDN_OAUTH2_AUTHORIZATION_CODE]') AND TYPE IN (N'U')) +CREATE TABLE IDN_OAUTH2_AUTHORIZATION_CODE ( + AUTHORIZATION_CODE VARCHAR(512), + CONSUMER_KEY_ID INTEGER, + CALLBACK_URL VARCHAR(1024), + SCOPE VARCHAR(2048), + AUTHZ_USER VARCHAR (100), + TENANT_ID INTEGER, + USER_DOMAIN VARCHAR(50), + TIME_CREATED DATETIME, + VALIDITY_PERIOD BIGINT, + STATE VARCHAR (25) DEFAULT 'ACTIVE', + TOKEN_ID VARCHAR(255), + PRIMARY KEY (AUTHORIZATION_CODE), + FOREIGN KEY (CONSUMER_KEY_ID) REFERENCES IDN_OAUTH_CONSUMER_APPS(ID) ON DELETE CASCADE +); + +IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[IDN_OAUTH2_ACCESS_TOKEN_SCOPE]') AND TYPE IN (N'U')) +CREATE TABLE IDN_OAUTH2_ACCESS_TOKEN_SCOPE ( + TOKEN_ID VARCHAR (255), + TOKEN_SCOPE VARCHAR (60), + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY (TOKEN_ID, TOKEN_SCOPE), + FOREIGN KEY (TOKEN_ID) REFERENCES IDN_OAUTH2_ACCESS_TOKEN(TOKEN_ID) ON DELETE CASCADE +); + +IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[IDN_OAUTH2_SCOPE]') AND TYPE IN (N'U')) +CREATE TABLE IDN_OAUTH2_SCOPE ( + SCOPE_ID INTEGER IDENTITY, + SCOPE_KEY VARCHAR(100) NOT NULL, + NAME VARCHAR(255) NULL, + DESCRIPTION VARCHAR(512) NULL, + TENANT_ID INTEGER NOT NULL DEFAULT 0, + ROLES VARCHAR (500) NULL, + PRIMARY KEY (SCOPE_ID) +); + +IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[IDN_OAUTH2_RESOURCE_SCOPE]') AND TYPE IN (N'U')) +CREATE TABLE IDN_OAUTH2_RESOURCE_SCOPE ( + RESOURCE_PATH VARCHAR(255) NOT NULL, + SCOPE_ID INTEGER NOT NULL, + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY (RESOURCE_PATH), + FOREIGN KEY (SCOPE_ID) REFERENCES IDN_OAUTH2_SCOPE (SCOPE_ID) +); + +IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[IDN_SCIM_GROUP]') AND TYPE IN (N'U')) +CREATE TABLE IDN_SCIM_GROUP ( + ID INTEGER IDENTITY, + TENANT_ID INTEGER NOT NULL, + ROLE_NAME VARCHAR(255) NOT NULL, + ATTR_NAME VARCHAR(1024) NOT NULL, + ATTR_VALUE VARCHAR(1024), + PRIMARY KEY (ID) +); + +IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[IDN_OPENID_REMEMBER_ME]') AND TYPE IN (N'U')) +CREATE TABLE IDN_OPENID_REMEMBER_ME ( + USER_NAME VARCHAR(255) NOT NULL, + TENANT_ID INTEGER DEFAULT 0, + COOKIE_VALUE VARCHAR(1024), + CREATED_TIME DATETIME, + PRIMARY KEY (USER_NAME, TENANT_ID) +); + +IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[IDN_OPENID_USER_RPS]') AND TYPE IN (N'U')) +CREATE TABLE IDN_OPENID_USER_RPS ( + USER_NAME VARCHAR(255) NOT NULL, + TENANT_ID INTEGER DEFAULT 0, + RP_URL VARCHAR(255) NOT NULL, + TRUSTED_ALWAYS VARCHAR(128) DEFAULT 'FALSE', + LAST_VISIT DATE NOT NULL, + VISIT_COUNT INTEGER DEFAULT 0, + DEFAULT_PROFILE_NAME VARCHAR(255) DEFAULT 'DEFAULT', + PRIMARY KEY (USER_NAME, TENANT_ID, RP_URL) +); + +IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[IDN_OPENID_ASSOCIATIONS]') AND TYPE IN (N'U')) +CREATE TABLE IDN_OPENID_ASSOCIATIONS ( + HANDLE VARCHAR(255) NOT NULL, + ASSOC_TYPE VARCHAR(255) NOT NULL, + EXPIRE_IN DATETIME NOT NULL, + MAC_KEY VARCHAR(255) NOT NULL, + ASSOC_STORE VARCHAR(128) DEFAULT 'SHARED', + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY (HANDLE) +); + +IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[IDN_STS_STORE]') AND TYPE IN (N'U')) +CREATE TABLE IDN_STS_STORE ( + ID INTEGER IDENTITY, + TOKEN_ID VARCHAR(255) NOT NULL, + TOKEN_CONTENT VARBINARY(MAX) NOT NULL, + CREATE_DATE DATETIME NOT NULL, + EXPIRE_DATE DATETIME NOT NULL, + STATE INTEGER DEFAULT 0, + PRIMARY KEY (ID) +); + +IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[IDN_IDENTITY_USER_DATA]') AND TYPE IN (N'U')) +CREATE TABLE IDN_IDENTITY_USER_DATA ( + TENANT_ID INTEGER DEFAULT -1234, + USER_NAME VARCHAR(255) NOT NULL, + DATA_KEY VARCHAR(255) NOT NULL, + DATA_VALUE VARCHAR(255), + PRIMARY KEY (TENANT_ID, USER_NAME, DATA_KEY) +); + +IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[IDN_IDENTITY_META_DATA]') AND TYPE IN (N'U')) +CREATE TABLE IDN_IDENTITY_META_DATA ( + USER_NAME VARCHAR(255) NOT NULL, + TENANT_ID INTEGER DEFAULT -1234, + METADATA_TYPE VARCHAR(255) NOT NULL, + METADATA VARCHAR(255) NOT NULL, + VALID VARCHAR(255) NOT NULL, + PRIMARY KEY (TENANT_ID, USER_NAME, METADATA_TYPE,METADATA) +); + +IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[IDN_THRIFT_SESSION]') AND TYPE IN (N'U')) +CREATE TABLE IDN_THRIFT_SESSION ( + SESSION_ID VARCHAR(255) NOT NULL, + USER_NAME VARCHAR(255) NOT NULL, + CREATED_TIME VARCHAR(255) NOT NULL, + LAST_MODIFIED_TIME VARCHAR(255) NOT NULL, + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY (SESSION_ID) +); + +IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[IDN_AUTH_SESSION_STORE]') AND TYPE IN (N'U')) +CREATE TABLE IDN_AUTH_SESSION_STORE ( + SESSION_ID VARCHAR (100) NOT NULL, + SESSION_TYPE VARCHAR(100) NOT NULL, + OPERATION VARCHAR(10) NOT NULL, + SESSION_OBJECT VARBINARY(MAX), + TIME_CREATED BIGINT, + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY (SESSION_ID, SESSION_TYPE, TIME_CREATED, OPERATION) +); + +IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[SP_APP]') AND TYPE IN (N'U')) +CREATE TABLE SP_APP ( + ID INTEGER NOT NULL IDENTITY, + TENANT_ID INTEGER NOT NULL, + APP_NAME VARCHAR (255) NOT NULL , + USER_STORE VARCHAR (255) NOT NULL, + USERNAME VARCHAR (255) NOT NULL , + DESCRIPTION VARCHAR (1024), + ROLE_CLAIM VARCHAR (512), + AUTH_TYPE VARCHAR (255) NOT NULL, + PROVISIONING_USERSTORE_DOMAIN VARCHAR (512), + IS_LOCAL_CLAIM_DIALECT CHAR(1) DEFAULT '1', + IS_SEND_LOCAL_SUBJECT_ID CHAR(1) DEFAULT '0', + IS_SEND_AUTH_LIST_OF_IDPS CHAR(1) DEFAULT '0', + IS_USE_TENANT_DOMAIN_SUBJECT CHAR(1) DEFAULT '1', + IS_USE_USER_DOMAIN_SUBJECT CHAR(1) DEFAULT '1', + SUBJECT_CLAIM_URI VARCHAR (512), + IS_SAAS_APP CHAR(1) DEFAULT '0', + IS_DUMB_MODE CHAR(1) DEFAULT '0', + PRIMARY KEY (ID)); + +ALTER TABLE SP_APP ADD CONSTRAINT APPLICATION_NAME_CONSTRAINT UNIQUE(APP_NAME, TENANT_ID); + +IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[SP_METADATA]') AND TYPE IN (N'U')) +CREATE TABLE SP_METADATA ( + ID INTEGER IDENTITY, + SP_ID INTEGER, + NAME VARCHAR(255) NOT NULL, + VALUE VARCHAR(255) NOT NULL, + DISPLAY_NAME VARCHAR(255), + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY (ID), + CONSTRAINT SP_METADATA_CONSTRAINT UNIQUE (SP_ID, NAME), + FOREIGN KEY (SP_ID) REFERENCES SP_APP(ID) ON DELETE CASCADE); + +IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[SP_INBOUND_AUTH]') AND TYPE IN (N'U')) +CREATE TABLE SP_INBOUND_AUTH ( + ID INTEGER NOT NULL IDENTITY, + TENANT_ID INTEGER NOT NULL, + INBOUND_AUTH_KEY VARCHAR (255) NOT NULL, + INBOUND_AUTH_TYPE VARCHAR (255) NOT NULL, + PROP_NAME VARCHAR (255), + PROP_VALUE VARCHAR (1024) , + APP_ID INTEGER NOT NULL, + PRIMARY KEY (ID)); + +ALTER TABLE SP_INBOUND_AUTH ADD CONSTRAINT APPLICATION_ID_CONSTRAINT FOREIGN KEY (APP_ID) REFERENCES SP_APP (ID) ON DELETE CASCADE; + +IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[SP_AUTH_STEP]') AND TYPE IN (N'U')) +CREATE TABLE SP_AUTH_STEP ( + ID INTEGER NOT NULL IDENTITY, + TENANT_ID INTEGER NOT NULL, + STEP_ORDER INTEGER DEFAULT 1, + APP_ID INTEGER NOT NULL, + IS_SUBJECT_STEP CHAR(1) DEFAULT '0', + IS_ATTRIBUTE_STEP CHAR(1) DEFAULT '0', + PRIMARY KEY (ID)); + +ALTER TABLE SP_AUTH_STEP ADD CONSTRAINT APPLICATION_ID_CONSTRAINT_STEP FOREIGN KEY (APP_ID) REFERENCES SP_APP (ID) ON DELETE CASCADE; + +IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[SP_FEDERATED_IDP]') AND TYPE IN (N'U')) +CREATE TABLE SP_FEDERATED_IDP ( + ID INTEGER NOT NULL, + TENANT_ID INTEGER NOT NULL, + AUTHENTICATOR_ID INTEGER NOT NULL, + PRIMARY KEY (ID, AUTHENTICATOR_ID)); + +ALTER TABLE SP_FEDERATED_IDP ADD CONSTRAINT STEP_ID_CONSTRAINT FOREIGN KEY (ID) REFERENCES SP_AUTH_STEP (ID) ON DELETE CASCADE; + +IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[SP_CLAIM_MAPPING]') AND TYPE IN (N'U')) +CREATE TABLE SP_CLAIM_MAPPING ( + ID INTEGER NOT NULL IDENTITY, + TENANT_ID INTEGER NOT NULL, + IDP_CLAIM VARCHAR (512) NOT NULL , + SP_CLAIM VARCHAR (512) NOT NULL , + APP_ID INTEGER NOT NULL, + IS_REQUESTED VARCHAR(128) DEFAULT '0', + DEFAULT_VALUE VARCHAR(255), + PRIMARY KEY (ID)); + +ALTER TABLE SP_CLAIM_MAPPING ADD CONSTRAINT CLAIMID_APPID_CONSTRAINT FOREIGN KEY (APP_ID) REFERENCES SP_APP (ID) ON DELETE CASCADE; + +IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[SP_ROLE_MAPPING]') AND TYPE IN (N'U')) +CREATE TABLE SP_ROLE_MAPPING ( + ID INTEGER NOT NULL IDENTITY, + TENANT_ID INTEGER NOT NULL, + IDP_ROLE VARCHAR (255) NOT NULL , + SP_ROLE VARCHAR (255) NOT NULL , + APP_ID INTEGER NOT NULL, + PRIMARY KEY (ID)); + +ALTER TABLE SP_ROLE_MAPPING ADD CONSTRAINT ROLEID_APPID_CONSTRAINT FOREIGN KEY (APP_ID) REFERENCES SP_APP (ID) ON DELETE CASCADE; + +IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[SP_REQ_PATH_AUTHENTICATOR]') AND TYPE IN (N'U')) +CREATE TABLE SP_REQ_PATH_AUTHENTICATOR ( + ID INTEGER NOT NULL IDENTITY, + TENANT_ID INTEGER NOT NULL, + AUTHENTICATOR_NAME VARCHAR (255) NOT NULL , + APP_ID INTEGER NOT NULL, + PRIMARY KEY (ID)); + +ALTER TABLE SP_REQ_PATH_AUTHENTICATOR ADD CONSTRAINT REQ_AUTH_APPID_CONSTRAINT FOREIGN KEY (APP_ID) REFERENCES SP_APP (ID) ON DELETE CASCADE; + +IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[SP_PROVISIONING_CONNECTOR]') AND TYPE IN (N'U')) +CREATE TABLE SP_PROVISIONING_CONNECTOR ( + ID INTEGER NOT NULL IDENTITY, + TENANT_ID INTEGER NOT NULL, + IDP_NAME VARCHAR (255) NOT NULL , + CONNECTOR_NAME VARCHAR (255) NOT NULL , + APP_ID INTEGER NOT NULL, + IS_JIT_ENABLED CHAR(1) NOT NULL DEFAULT '0', + BLOCKING CHAR(1) NOT NULL DEFAULT '0', + PRIMARY KEY (ID)); + +ALTER TABLE SP_PROVISIONING_CONNECTOR ADD CONSTRAINT PRO_CONNECTOR_APPID_CONSTRAINT FOREIGN KEY (APP_ID) REFERENCES SP_APP (ID) ON DELETE CASCADE; + +IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[IDP]') AND TYPE IN (N'U')) +CREATE TABLE IDP ( + ID INTEGER IDENTITY, + TENANT_ID INTEGER, + NAME VARCHAR(254) NOT NULL, + IS_ENABLED CHAR(1) NOT NULL DEFAULT '1', + IS_PRIMARY CHAR(1) NOT NULL DEFAULT '0', + HOME_REALM_ID VARCHAR(254), + IMAGE VARBINARY(MAX), + CERTIFICATE VARBINARY(MAX), + ALIAS VARCHAR(254), + INBOUND_PROV_ENABLED CHAR (1) NOT NULL DEFAULT '0', + INBOUND_PROV_USER_STORE_ID VARCHAR(254), + USER_CLAIM_URI VARCHAR(254), + ROLE_CLAIM_URI VARCHAR(254), + DESCRIPTION VARCHAR (1024), + DEFAULT_AUTHENTICATOR_NAME VARCHAR(254), + DEFAULT_PRO_CONNECTOR_NAME VARCHAR(254), + PROVISIONING_ROLE VARCHAR(128), + IS_FEDERATION_HUB CHAR(1) NOT NULL DEFAULT '0', + IS_LOCAL_CLAIM_DIALECT CHAR(1) NOT NULL DEFAULT '0', + PRIMARY KEY (ID), + DISPLAY_NAME VARCHAR(255), + UNIQUE (TENANT_ID, NAME)); + +INSERT INTO IDP (TENANT_ID, NAME, HOME_REALM_ID) VALUES (-1234, 'LOCAL', 'localhost'); + +IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[IDP_ROLE]') AND TYPE IN (N'U')) +CREATE TABLE IDP_ROLE ( + ID INTEGER IDENTITY, + IDP_ID INTEGER, + TENANT_ID INTEGER, + ROLE VARCHAR(254), + PRIMARY KEY (ID), + UNIQUE (IDP_ID, ROLE), + FOREIGN KEY (IDP_ID) REFERENCES IDP(ID) ON DELETE CASCADE); + +IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[IDP_ROLE_MAPPING]') AND TYPE IN (N'U')) +CREATE TABLE IDP_ROLE_MAPPING ( + ID INTEGER IDENTITY, + IDP_ROLE_ID INTEGER, + TENANT_ID INTEGER, + USER_STORE_ID VARCHAR (253), + LOCAL_ROLE VARCHAR(253), + PRIMARY KEY (ID), + UNIQUE (IDP_ROLE_ID, TENANT_ID, USER_STORE_ID, LOCAL_ROLE), + FOREIGN KEY (IDP_ROLE_ID) REFERENCES IDP_ROLE(ID) ON DELETE CASCADE); + +IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[IDP_CLAIM]') AND TYPE IN (N'U')) +CREATE TABLE IDP_CLAIM ( + ID INTEGER IDENTITY, + IDP_ID INTEGER, + TENANT_ID INTEGER, + CLAIM VARCHAR(254), + PRIMARY KEY (ID), + UNIQUE (IDP_ID, CLAIM), + FOREIGN KEY (IDP_ID) REFERENCES IDP(ID) ON DELETE CASCADE); + +IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[IDP_CLAIM_MAPPING]') AND TYPE IN (N'U')) +CREATE TABLE IDP_CLAIM_MAPPING ( + ID INTEGER IDENTITY, + IDP_CLAIM_ID INTEGER, + TENANT_ID INTEGER, + LOCAL_CLAIM VARCHAR(253), + DEFAULT_VALUE VARCHAR(255), + IS_REQUESTED VARCHAR(128) DEFAULT '0', + PRIMARY KEY (ID), + UNIQUE (IDP_CLAIM_ID, TENANT_ID, LOCAL_CLAIM), + FOREIGN KEY (IDP_CLAIM_ID) REFERENCES IDP_CLAIM(ID) ON DELETE CASCADE); + +IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[IDP_AUTHENTICATOR]') AND TYPE IN (N'U')) +CREATE TABLE IDP_AUTHENTICATOR ( + ID INTEGER IDENTITY, + TENANT_ID INTEGER, + IDP_ID INTEGER, + NAME VARCHAR(255) NOT NULL, + IS_ENABLED CHAR (1) DEFAULT '1', + DISPLAY_NAME VARCHAR(255), + PRIMARY KEY (ID), + UNIQUE (TENANT_ID, IDP_ID, NAME), + FOREIGN KEY (IDP_ID) REFERENCES IDP(ID) ON DELETE CASCADE); + +INSERT INTO IDP_AUTHENTICATOR (TENANT_ID, IDP_ID, NAME) VALUES (-1234, 1, 'samlsso'); +INSERT INTO IDP_AUTHENTICATOR (TENANT_ID, IDP_ID, NAME) VALUES (-1234, 1, 'IDPProperties'); +INSERT INTO IDP_AUTHENTICATOR (TENANT_ID, IDP_ID, NAME) VALUES (-1234, 1, 'passivests'); + +IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[IDP_METADATA]') AND TYPE IN (N'U')) +CREATE TABLE IDP_METADATA ( + ID INTEGER IDENTITY, + IDP_ID INTEGER, + NAME VARCHAR(255) NOT NULL, + VALUE VARCHAR(255) NOT NULL, + DISPLAY_NAME VARCHAR(255), + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY (ID), + CONSTRAINT IDP_METADATA_CONSTRAINT UNIQUE (IDP_ID, NAME), + FOREIGN KEY (IDP_ID) REFERENCES IDP(ID) ON DELETE CASCADE); + +INSERT INTO IDP_METADATA (IDP_ID, NAME, VALUE, DISPLAY_NAME) VALUES (1, 'SessionIdleTimeout', '20160', 'Session Idle Timeout'); +INSERT INTO IDP_METADATA (IDP_ID, NAME, VALUE, DISPLAY_NAME) VALUES (1, 'RememberMeTimeout', '15', 'RememberMe Timeout'); + +IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[IDP_AUTHENTICATOR_PROPERTY]') AND TYPE IN (N'U')) +CREATE TABLE IDP_AUTHENTICATOR_PROPERTY ( + ID INTEGER IDENTITY, + TENANT_ID INTEGER, + AUTHENTICATOR_ID INTEGER, + PROPERTY_KEY VARCHAR(255) NOT NULL, + PROPERTY_VALUE VARCHAR(2047), + IS_SECRET CHAR (1) DEFAULT '0', + PRIMARY KEY (ID), + UNIQUE (TENANT_ID, AUTHENTICATOR_ID, PROPERTY_KEY), + FOREIGN KEY (AUTHENTICATOR_ID) REFERENCES IDP_AUTHENTICATOR(ID) ON DELETE CASCADE); + +INSERT INTO IDP_AUTHENTICATOR_PROPERTY (TENANT_ID, AUTHENTICATOR_ID, PROPERTY_KEY,PROPERTY_VALUE, IS_SECRET ) VALUES (-1234, 1 , 'IdPEntityId', 'localhost', '0'); +INSERT INTO IDP_AUTHENTICATOR_PROPERTY (TENANT_ID, AUTHENTICATOR_ID, PROPERTY_KEY,PROPERTY_VALUE, IS_SECRET ) VALUES (-1234, 3 , 'IdPEntityId', 'localhost', '0'); + +IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[IDP_PROVISIONING_CONFIG]') AND TYPE IN (N'U')) +CREATE TABLE IDP_PROVISIONING_CONFIG ( + ID INTEGER IDENTITY, + TENANT_ID INTEGER, + IDP_ID INTEGER, + PROVISIONING_CONNECTOR_TYPE VARCHAR(255) NOT NULL, + IS_ENABLED CHAR (1) DEFAULT '0', + IS_BLOCKING CHAR (1) DEFAULT '0', + PRIMARY KEY (ID), + UNIQUE (TENANT_ID, IDP_ID, PROVISIONING_CONNECTOR_TYPE), + FOREIGN KEY (IDP_ID) REFERENCES IDP(ID) ON DELETE CASCADE); + +IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[IDP_PROV_CONFIG_PROPERTY]') AND TYPE IN (N'U')) +CREATE TABLE IDP_PROV_CONFIG_PROPERTY ( + ID INTEGER IDENTITY, + TENANT_ID INTEGER, + PROVISIONING_CONFIG_ID INTEGER, + PROPERTY_KEY VARCHAR(255) NOT NULL, + PROPERTY_VALUE VARCHAR(2048), + PROPERTY_BLOB_VALUE VARBINARY(MAX), + PROPERTY_TYPE CHAR(32) NOT NULL, + IS_SECRET CHAR (1) DEFAULT '0', + PRIMARY KEY (ID), + UNIQUE (TENANT_ID, PROVISIONING_CONFIG_ID, PROPERTY_KEY), + FOREIGN KEY (PROVISIONING_CONFIG_ID) REFERENCES IDP_PROVISIONING_CONFIG(ID) ON DELETE CASCADE); + +IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[IDP_PROVISIONING_ENTITY]') AND TYPE IN (N'U')) +CREATE TABLE IDP_PROVISIONING_ENTITY ( + ID INTEGER IDENTITY, + PROVISIONING_CONFIG_ID INTEGER, + ENTITY_TYPE VARCHAR(255) NOT NULL, + ENTITY_LOCAL_USERSTORE VARCHAR(255) NOT NULL, + ENTITY_NAME VARCHAR(255) NOT NULL, + ENTITY_VALUE VARCHAR(255), + TENANT_ID INTEGER, + ENTITY_LOCAL_ID VARCHAR(255), + PRIMARY KEY (ID), + UNIQUE (ENTITY_TYPE, TENANT_ID, ENTITY_LOCAL_USERSTORE, ENTITY_NAME, PROVISIONING_CONFIG_ID), + UNIQUE (PROVISIONING_CONFIG_ID, ENTITY_TYPE, ENTITY_VALUE), + FOREIGN KEY (PROVISIONING_CONFIG_ID) REFERENCES IDP_PROVISIONING_CONFIG(ID) ON DELETE CASCADE); + +IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[IDP_LOCAL_CLAIM]') AND TYPE IN (N'U')) +CREATE TABLE IDP_LOCAL_CLAIM ( + ID INTEGER IDENTITY, + TENANT_ID INTEGER, + IDP_ID INTEGER, + CLAIM_URI VARCHAR(255) NOT NULL, + DEFAULT_VALUE VARCHAR(255), + IS_REQUESTED VARCHAR(128) DEFAULT '0', + PRIMARY KEY (ID), + UNIQUE (TENANT_ID, IDP_ID, CLAIM_URI), + FOREIGN KEY (IDP_ID) REFERENCES IDP(ID) ON DELETE CASCADE); + +IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[IDN_ASSOCIATED_ID]') AND TYPE IN (N'U')) +CREATE TABLE IDN_ASSOCIATED_ID ( + ID INTEGER IDENTITY, + IDP_USER_ID VARCHAR(255) NOT NULL, + TENANT_ID INTEGER DEFAULT -1234, + IDP_ID INTEGER NOT NULL, + DOMAIN_NAME VARCHAR(255) NOT NULL, + USER_NAME VARCHAR(255) NOT NULL, + PRIMARY KEY (ID), + UNIQUE(IDP_USER_ID, TENANT_ID, IDP_ID), + FOREIGN KEY (IDP_ID) REFERENCES IDP(ID) ON DELETE CASCADE +); + +IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[IDN_USER_ACCOUNT_ASSOCIATION]') AND TYPE IN (N'U')) +CREATE TABLE IDN_USER_ACCOUNT_ASSOCIATION ( + ASSOCIATION_KEY VARCHAR(255) NOT NULL, + TENANT_ID INTEGER, + DOMAIN_NAME VARCHAR(255) NOT NULL, + USER_NAME VARCHAR(255) NOT NULL, + PRIMARY KEY (TENANT_ID, DOMAIN_NAME, USER_NAME)); + +IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[FIDO_DEVICE_STORE]') AND TYPE IN (N'U')) +CREATE TABLE FIDO_DEVICE_STORE ( + TENANT_ID INTEGER, + DOMAIN_NAME VARCHAR(255) NOT NULL, + USER_NAME VARCHAR(45) NOT NULL, + TIME_REGISTERED DATETIME, + KEY_HANDLE VARCHAR(200) NOT NULL, + DEVICE_DATA VARCHAR(2048) NOT NULL, + PRIMARY KEY (TENANT_ID, DOMAIN_NAME, USER_NAME, KEY_HANDLE)); + +IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[WF_REQUEST]') AND TYPE IN (N'U')) +CREATE TABLE WF_REQUEST ( + UUID VARCHAR (45), + CREATED_BY VARCHAR (255), + TENANT_ID INTEGER DEFAULT -1, + OPERATION_TYPE VARCHAR (50), + CREATED_AT DATETIME, + UPDATED_AT DATETIME, + STATUS VARCHAR (30), + REQUEST VARBINARY(MAX), + PRIMARY KEY (UUID) +); + +IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[WF_BPS_PROFILE]') AND TYPE IN (N'U')) +CREATE TABLE WF_BPS_PROFILE ( + PROFILE_NAME VARCHAR(45), + HOST_URL_MANAGER VARCHAR(45), + HOST_URL_WORKER VARCHAR(45), + USERNAME VARCHAR(45), + PASSWORD VARCHAR(255), + CALLBACK_HOST VARCHAR (45), + CALLBACK_USERNAME VARCHAR (45), + CALLBACK_PASSWORD VARCHAR (255), + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY (PROFILE_NAME, TENANT_ID) +); + +IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[WF_WORKFLOW]') AND TYPE IN (N'U')) +CREATE TABLE WF_WORKFLOW( + ID VARCHAR (45), + WF_NAME VARCHAR (45), + DESCRIPTION VARCHAR (255), + TEMPLATE_ID VARCHAR (45), + IMPL_ID VARCHAR (45), + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY (ID) +); + +IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[WF_WORKFLOW_ASSOCIATION]') AND TYPE IN (N'U')) +CREATE TABLE WF_WORKFLOW_ASSOCIATION( + ID INTEGER NOT NULL IDENTITY , + ASSOC_NAME VARCHAR (45), + EVENT_ID VARCHAR(45), + ASSOC_CONDITION VARCHAR (2000), + WORKFLOW_ID VARCHAR (45), + IS_ENABLED CHAR (1) DEFAULT '1', + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY(ID), + FOREIGN KEY (WORKFLOW_ID) REFERENCES WF_WORKFLOW(ID)ON DELETE CASCADE +); + +IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[WF_WORKFLOW_CONFIG_PARAM]') AND TYPE IN (N'U')) +CREATE TABLE WF_WORKFLOW_CONFIG_PARAM( + WORKFLOW_ID VARCHAR (45), + PARAM_NAME VARCHAR (45), + PARAM_VALUE VARCHAR (1000), + PARAM_QNAME VARCHAR (45), + PARAM_HOLDER VARCHAR (45), + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY (WORKFLOW_ID, PARAM_NAME, PARAM_QNAME, PARAM_HOLDER), + FOREIGN KEY (WORKFLOW_ID) REFERENCES WF_WORKFLOW(ID)ON DELETE CASCADE +); + +IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[WF_REQUEST_ENTITY_RELATIONSHIP]') AND TYPE IN (N'U')) +CREATE TABLE WF_REQUEST_ENTITY_RELATIONSHIP( + REQUEST_ID VARCHAR (45), + ENTITY_NAME VARCHAR (255), + ENTITY_TYPE VARCHAR (50), + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY(REQUEST_ID, ENTITY_NAME, ENTITY_TYPE, TENANT_ID), + FOREIGN KEY (REQUEST_ID) REFERENCES WF_REQUEST(UUID)ON DELETE CASCADE +); + +IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[WF_WORKFLOW_REQUEST_RELATION]') AND TYPE IN (N'U')) +CREATE TABLE WF_WORKFLOW_REQUEST_RELATION( + RELATIONSHIP_ID VARCHAR (45), + WORKFLOW_ID VARCHAR (45), + REQUEST_ID VARCHAR (45), + UPDATED_AT DATETIME, + STATUS VARCHAR (30), + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY (RELATIONSHIP_ID), + FOREIGN KEY (WORKFLOW_ID) REFERENCES WF_WORKFLOW(ID)ON DELETE CASCADE, + FOREIGN KEY (REQUEST_ID) REFERENCES WF_REQUEST(UUID)ON DELETE CASCADE +); + +-- Start of API-Mgt Tables -- + +IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[AM_SUBSCRIBER]') AND TYPE IN (N'U')) + +CREATE TABLE AM_SUBSCRIBER ( + SUBSCRIBER_ID INTEGER IDENTITY(1,1), + USER_ID VARCHAR(50) NOT NULL, + TENANT_ID INTEGER NOT NULL, + EMAIL_ADDRESS VARCHAR(256) NULL, + DATE_SUBSCRIBED DATETIME NOT NULL, + CREATED_BY VARCHAR(100), + CREATED_TIME DATETIME, + UPDATED_BY VARCHAR(100), + UPDATED_TIME DATETIME, + PRIMARY KEY (SUBSCRIBER_ID), + UNIQUE (TENANT_ID,USER_ID) +); + +IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[AM_APPLICATION]') AND TYPE IN (N'U')) + +CREATE TABLE AM_APPLICATION ( + APPLICATION_ID INTEGER IDENTITY(1,1), + NAME VARCHAR(100) COLLATE Latin1_General_CS_AS, + SUBSCRIBER_ID INTEGER, + APPLICATION_TIER VARCHAR(50) DEFAULT 'Unlimited', + CALLBACK_URL VARCHAR(512), + DESCRIPTION VARCHAR(512), + APPLICATION_STATUS VARCHAR(50) DEFAULT 'APPROVED', + CREATED_BY VARCHAR(100), + CREATED_TIME DATETIME, + UPDATED_BY VARCHAR(100), + UPDATED_TIME DATETIME, + FOREIGN KEY(SUBSCRIBER_ID) REFERENCES AM_SUBSCRIBER(SUBSCRIBER_ID) ON UPDATE CASCADE, + PRIMARY KEY(APPLICATION_ID), + UNIQUE (NAME,SUBSCRIBER_ID) +); + +IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[AM_API]') AND TYPE IN (N'U')) + +CREATE TABLE AM_API ( + API_ID INTEGER IDENTITY(1,1), + API_PROVIDER VARCHAR(200), + API_NAME VARCHAR(200), + API_VERSION VARCHAR(30), + CONTEXT VARCHAR(256), + CONTEXT_TEMPLATE VARCHAR(256), + CREATED_BY VARCHAR(100), + CREATED_TIME DATETIME, + UPDATED_BY VARCHAR(100), + UPDATED_TIME DATETIME, + PRIMARY KEY(API_ID), + UNIQUE (API_PROVIDER,API_NAME,API_VERSION) +); + +IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[AM_API_URL_MAPPING]') AND TYPE IN (N'U')) + +CREATE TABLE AM_API_URL_MAPPING ( + URL_MAPPING_ID INTEGER IDENTITY(1,1), + API_ID INTEGER NOT NULL, + HTTP_METHOD VARCHAR(20) NULL, + AUTH_SCHEME VARCHAR(50) NULL, + URL_PATTERN VARCHAR(512) NULL, + THROTTLING_TIER varchar(512) DEFAULT NULL, + MEDIATION_SCRIPT VARBINARY(MAX), + PRIMARY KEY (URL_MAPPING_ID) +); + +IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[AM_SUBSCRIPTION]') AND TYPE IN (N'U')) + +CREATE TABLE AM_SUBSCRIPTION ( + SUBSCRIPTION_ID INTEGER IDENTITY(1,1), + TIER_ID VARCHAR(50), + API_ID INTEGER, + LAST_ACCESSED DATETIME NULL, + APPLICATION_ID INTEGER, + SUB_STATUS VARCHAR(50), + SUBS_CREATE_STATE VARCHAR(50) DEFAULT 'SUBSCRIBE', + CREATED_BY VARCHAR(100), + CREATED_TIME DATETIME, + UPDATED_BY VARCHAR(100), + UPDATED_TIME DATETIME, + FOREIGN KEY(APPLICATION_ID) REFERENCES AM_APPLICATION(APPLICATION_ID) ON UPDATE CASCADE, + FOREIGN KEY(API_ID) REFERENCES AM_API(API_ID) ON UPDATE CASCADE, + PRIMARY KEY (SUBSCRIPTION_ID) +); + +IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[AM_SUBSCRIPTION_KEY_MAPPING]') AND TYPE IN (N'U')) + +CREATE TABLE AM_SUBSCRIPTION_KEY_MAPPING ( + SUBSCRIPTION_ID INTEGER, + ACCESS_TOKEN VARCHAR(255), + KEY_TYPE VARCHAR(512) NOT NULL, + FOREIGN KEY(SUBSCRIPTION_ID) REFERENCES AM_SUBSCRIPTION(SUBSCRIPTION_ID) ON UPDATE CASCADE, + PRIMARY KEY(SUBSCRIPTION_ID,ACCESS_TOKEN) +); + +IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[AM_APPLICATION_KEY_MAPPING]') AND TYPE IN (N'U')) + +CREATE TABLE AM_APPLICATION_KEY_MAPPING ( + APPLICATION_ID INTEGER, + CONSUMER_KEY VARCHAR(512), + KEY_TYPE VARCHAR(512) NOT NULL, + STATE VARCHAR(30) NOT NULL, + FOREIGN KEY(APPLICATION_ID) REFERENCES AM_APPLICATION(APPLICATION_ID) ON UPDATE CASCADE, + PRIMARY KEY(APPLICATION_ID,KEY_TYPE) +); + +IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[AM_APPLICATION_REGISTRATION]') AND TYPE IN (N'U')) + +CREATE TABLE AM_APPLICATION_REGISTRATION ( + REG_ID INTEGER IDENTITY(1,1), + SUBSCRIBER_ID INTEGER, + WF_REF VARCHAR(255) NOT NULL, + APP_ID INTEGER, + TOKEN_TYPE VARCHAR(30), + TOKEN_SCOPE VARCHAR(256) DEFAULT 'default', + ALLOWED_DOMAINS VARCHAR(256), + VALIDITY_PERIOD BIGINT, + UNIQUE (SUBSCRIBER_ID,APP_ID,TOKEN_TYPE), + FOREIGN KEY(SUBSCRIBER_ID) REFERENCES AM_SUBSCRIBER(SUBSCRIBER_ID) ON DELETE NO ACTION, + FOREIGN KEY(APP_ID) REFERENCES AM_APPLICATION(APPLICATION_ID) ON UPDATE CASCADE ON DELETE NO ACTION, + PRIMARY KEY (REG_ID) +); + + +IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[AM_API_LC_EVENT]') AND TYPE IN (N'U')) + +CREATE TABLE AM_API_LC_EVENT ( + EVENT_ID INTEGER IDENTITY(1,1), + API_ID INTEGER NOT NULL, + PREVIOUS_STATE VARCHAR(50), + NEW_STATE VARCHAR(50) NOT NULL, + USER_ID VARCHAR(50) NOT NULL, + TENANT_ID INTEGER NOT NULL, + EVENT_DATE DATETIME NOT NULL, + FOREIGN KEY(API_ID) REFERENCES AM_API(API_ID) ON UPDATE CASCADE, + PRIMARY KEY (EVENT_ID) +); + +IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[AM_APP_KEY_DOMAIN_MAPPING]') AND TYPE IN (N'U')) + +CREATE TABLE AM_APP_KEY_DOMAIN_MAPPING ( + CONSUMER_KEY VARCHAR(512), + AUTHZ_DOMAIN VARCHAR(255) DEFAULT 'ALL', + PRIMARY KEY (CONSUMER_KEY,AUTHZ_DOMAIN) + +); + +IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[AM_API_COMMENTS]') AND TYPE IN (N'U')) + +CREATE TABLE AM_API_COMMENTS ( + COMMENT_ID INTEGER IDENTITY(1,1), + COMMENT_TEXT VARCHAR(512), + COMMENTED_USER VARCHAR(255), + DATE_COMMENTED DATETIME NOT NULL, + API_ID INTEGER NOT NULL, + FOREIGN KEY(API_ID) REFERENCES AM_API(API_ID) ON UPDATE CASCADE, + PRIMARY KEY (COMMENT_ID) +); + +IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[AM_API_RATINGS]') AND TYPE IN (N'U')) + +CREATE TABLE AM_API_RATINGS ( + RATING_ID INTEGER IDENTITY(1,1), + API_ID INTEGER, + RATING INTEGER, + SUBSCRIBER_ID INTEGER, + FOREIGN KEY(API_ID) REFERENCES AM_API(API_ID) ON UPDATE CASCADE, + FOREIGN KEY(SUBSCRIBER_ID) REFERENCES AM_SUBSCRIBER(SUBSCRIBER_ID) ON UPDATE CASCADE, + PRIMARY KEY (RATING_ID) +); + +IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[AM_TIER_PERMISSIONS]') AND TYPE IN (N'U')) + +CREATE TABLE AM_TIER_PERMISSIONS ( + TIER_PERMISSIONS_ID INTEGER IDENTITY(1,1), + TIER VARCHAR(50) NOT NULL, + PERMISSIONS_TYPE VARCHAR(50) NOT NULL, + ROLES VARCHAR(512) NOT NULL, + TENANT_ID INTEGER NOT NULL, + PRIMARY KEY(TIER_PERMISSIONS_ID) +); + +IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[AM_EXTERNAL_STORES]') AND TYPE IN (N'U')) + +CREATE TABLE AM_EXTERNAL_STORES ( + APISTORE_ID INTEGER IDENTITY(1,1), + API_ID INTEGER, + STORE_ID VARCHAR(255) NOT NULL, + STORE_DISPLAY_NAME VARCHAR(255) NOT NULL, + STORE_ENDPOINT VARCHAR(255) NOT NULL, + STORE_TYPE VARCHAR(255) NOT NULL, + FOREIGN KEY(API_ID) REFERENCES AM_API(API_ID) ON UPDATE CASCADE, + PRIMARY KEY (API_ID) +); + +IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[AM_WORKFLOWS]') AND TYPE IN (N'U')) + +CREATE TABLE AM_WORKFLOWS( + WF_ID INTEGER IDENTITY(1,1), + WF_REFERENCE VARCHAR(255) NOT NULL, + WF_TYPE VARCHAR(255) NOT NULL, + WF_STATUS VARCHAR(255) NOT NULL, + WF_CREATED_TIME DATETIME DEFAULT GETDATE(), + WF_UPDATED_TIME DATETIME DEFAULT GETDATE(), + WF_STATUS_DESC VARCHAR(1000), + TENANT_ID INTEGER, + TENANT_DOMAIN VARCHAR(255), + WF_EXTERNAL_REFERENCE VARCHAR(255) NOT NULL UNIQUE, + PRIMARY KEY (WF_ID) +); + +IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[AM_API_SCOPES]') AND TYPE IN (N'U')) + +CREATE TABLE AM_API_SCOPES ( + API_ID INTEGER NOT NULL, + SCOPE_ID INTEGER NOT NULL, + FOREIGN KEY (API_ID) REFERENCES AM_API (API_ID) ON DELETE CASCADE ON UPDATE CASCADE, + FOREIGN KEY (SCOPE_ID) REFERENCES IDN_OAUTH2_SCOPE (SCOPE_ID) ON DELETE CASCADE ON UPDATE CASCADE +); + +IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[AM_API_DEFAULT_VERSION]') AND TYPE IN (N'U')) + +CREATE TABLE AM_API_DEFAULT_VERSION ( + DEFAULT_VERSION_ID INTEGER NOT NULL IDENTITY, + API_NAME VARCHAR(256) NOT NULL , + API_PROVIDER VARCHAR(256) NOT NULL , + DEFAULT_API_VERSION VARCHAR(30) , + PUBLISHED_DEFAULT_API_VERSION VARCHAR(30) , + PRIMARY KEY (DEFAULT_VERSION_ID) +); + + +CREATE INDEX IDX_SUB_APP_ID ON AM_SUBSCRIPTION (APPLICATION_ID, SUBSCRIPTION_ID); diff --git a/modules/distribution/src/repository/resources/dbscripts/apimgt/mysql.sql b/modules/distribution/src/repository/resources/dbscripts/apimgt/mysql.sql new file mode 100644 index 00000000..c188587f --- /dev/null +++ b/modules/distribution/src/repository/resources/dbscripts/apimgt/mysql.sql @@ -0,0 +1,798 @@ +-- Start of IDENTITY Tables-- + +CREATE TABLE IF NOT EXISTS IDN_BASE_TABLE ( + PRODUCT_NAME VARCHAR(20), + PRIMARY KEY (PRODUCT_NAME) +)ENGINE INNODB; + +INSERT INTO IDN_BASE_TABLE values ('WSO2 Identity Server'); + +CREATE TABLE IF NOT EXISTS IDN_OAUTH_CONSUMER_APPS ( + ID INTEGER NOT NULL AUTO_INCREMENT, + CONSUMER_KEY VARCHAR(255), + CONSUMER_SECRET VARCHAR(512), + USERNAME VARCHAR(255), + TENANT_ID INTEGER DEFAULT 0, + USER_DOMAIN VARCHAR(50), + APP_NAME VARCHAR(255), + OAUTH_VERSION VARCHAR(128), + CALLBACK_URL VARCHAR(1024), + GRANT_TYPES VARCHAR (1024), + CONSTRAINT CONSUMER_KEY_CONSTRAINT UNIQUE (CONSUMER_KEY), + PRIMARY KEY (ID) +)ENGINE INNODB; + +CREATE TABLE IF NOT EXISTS IDN_OAUTH1A_REQUEST_TOKEN ( + REQUEST_TOKEN VARCHAR(255), + REQUEST_TOKEN_SECRET VARCHAR(512), + CONSUMER_KEY_ID INTEGER, + CALLBACK_URL VARCHAR(1024), + SCOPE VARCHAR(2048), + AUTHORIZED VARCHAR(128), + OAUTH_VERIFIER VARCHAR(512), + AUTHZ_USER VARCHAR(512), + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY (REQUEST_TOKEN), + FOREIGN KEY (CONSUMER_KEY_ID) REFERENCES IDN_OAUTH_CONSUMER_APPS(ID) ON DELETE CASCADE +)ENGINE INNODB; + +CREATE TABLE IF NOT EXISTS IDN_OAUTH1A_ACCESS_TOKEN ( + ACCESS_TOKEN VARCHAR(255), + ACCESS_TOKEN_SECRET VARCHAR(512), + CONSUMER_KEY_ID INTEGER, + SCOPE VARCHAR(2048), + AUTHZ_USER VARCHAR(512), + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY (ACCESS_TOKEN), + FOREIGN KEY (CONSUMER_KEY_ID) REFERENCES IDN_OAUTH_CONSUMER_APPS(ID) ON DELETE CASCADE +)ENGINE INNODB; + +CREATE TABLE IF NOT EXISTS IDN_OAUTH2_ACCESS_TOKEN ( + TOKEN_ID VARCHAR (255), + ACCESS_TOKEN VARCHAR(255), + REFRESH_TOKEN VARCHAR(255), + CONSUMER_KEY_ID INTEGER, + AUTHZ_USER VARCHAR (100), + TENANT_ID INTEGER, + USER_DOMAIN VARCHAR(50), + USER_TYPE VARCHAR (25), + GRANT_TYPE VARCHAR (50), + TIME_CREATED TIMESTAMP DEFAULT 0, + REFRESH_TOKEN_TIME_CREATED TIMESTAMP DEFAULT 0, + VALIDITY_PERIOD BIGINT, + REFRESH_TOKEN_VALIDITY_PERIOD BIGINT, + TOKEN_SCOPE_HASH VARCHAR(32), + TOKEN_STATE VARCHAR(25) DEFAULT 'ACTIVE', + TOKEN_STATE_ID VARCHAR (128) DEFAULT 'NONE', + PRIMARY KEY (TOKEN_ID), + FOREIGN KEY (CONSUMER_KEY_ID) REFERENCES IDN_OAUTH_CONSUMER_APPS(ID) ON DELETE CASCADE, + CONSTRAINT CON_APP_KEY UNIQUE (CONSUMER_KEY_ID,AUTHZ_USER,TENANT_ID,USER_DOMAIN,USER_TYPE,TOKEN_SCOPE_HASH, + TOKEN_STATE,TOKEN_STATE_ID) +)ENGINE INNODB; + +CREATE INDEX IDX_AT_CK_AU ON IDN_OAUTH2_ACCESS_TOKEN(CONSUMER_KEY_ID, AUTHZ_USER, TOKEN_STATE, USER_TYPE); + +CREATE INDEX IDX_TC ON IDN_OAUTH2_ACCESS_TOKEN(TIME_CREATED); + +CREATE TABLE IF NOT EXISTS IDN_OAUTH2_AUTHORIZATION_CODE ( + AUTHORIZATION_CODE VARCHAR(512), + CONSUMER_KEY_ID INTEGER, + CALLBACK_URL VARCHAR(1024), + SCOPE VARCHAR(2048), + AUTHZ_USER VARCHAR (100), + TENANT_ID INTEGER, + USER_DOMAIN VARCHAR(50), + TIME_CREATED TIMESTAMP, + VALIDITY_PERIOD BIGINT, + STATE VARCHAR (25) DEFAULT 'ACTIVE', + TOKEN_ID VARCHAR(255), + PRIMARY KEY (AUTHORIZATION_CODE), + FOREIGN KEY (CONSUMER_KEY_ID) REFERENCES IDN_OAUTH_CONSUMER_APPS(ID) ON DELETE CASCADE +)ENGINE INNODB; + +CREATE TABLE IF NOT EXISTS IDN_OAUTH2_ACCESS_TOKEN_SCOPE ( + TOKEN_ID VARCHAR (255), + TOKEN_SCOPE VARCHAR (60), + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY (TOKEN_ID, TOKEN_SCOPE), + FOREIGN KEY (TOKEN_ID) REFERENCES IDN_OAUTH2_ACCESS_TOKEN(TOKEN_ID) ON DELETE CASCADE +)ENGINE INNODB; + +CREATE TABLE IF NOT EXISTS IDN_OAUTH2_SCOPE ( + SCOPE_ID INT(11) NOT NULL AUTO_INCREMENT, + SCOPE_KEY VARCHAR(100) NOT NULL, + NAME VARCHAR(255) NULL, + DESCRIPTION VARCHAR(512) NULL, + TENANT_ID INT(11) NOT NULL DEFAULT 0, + ROLES VARCHAR (500) NULL, + PRIMARY KEY (SCOPE_ID) +)ENGINE INNODB; + +CREATE TABLE IF NOT EXISTS IDN_OAUTH2_RESOURCE_SCOPE ( + RESOURCE_PATH VARCHAR(255) NOT NULL, + SCOPE_ID INTEGER (11) NOT NULL, + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY (RESOURCE_PATH), + FOREIGN KEY (SCOPE_ID) REFERENCES IDN_OAUTH2_SCOPE (SCOPE_ID) +)ENGINE INNODB; + +CREATE TABLE IF NOT EXISTS IDN_SCIM_GROUP ( + ID INTEGER AUTO_INCREMENT, + TENANT_ID INTEGER NOT NULL, + ROLE_NAME VARCHAR(255) NOT NULL, + ATTR_NAME VARCHAR(1024) NOT NULL, + ATTR_VALUE VARCHAR(1024), + PRIMARY KEY (ID) +)ENGINE INNODB; + +CREATE TABLE IF NOT EXISTS IDN_OPENID_REMEMBER_ME ( + USER_NAME VARCHAR(255) NOT NULL, + TENANT_ID INTEGER DEFAULT 0, + COOKIE_VALUE VARCHAR(1024), + CREATED_TIME TIMESTAMP, + PRIMARY KEY (USER_NAME, TENANT_ID) +)ENGINE INNODB; + +CREATE TABLE IF NOT EXISTS IDN_OPENID_USER_RPS ( + USER_NAME VARCHAR(255) NOT NULL, + TENANT_ID INTEGER DEFAULT 0, + RP_URL VARCHAR(255) NOT NULL, + TRUSTED_ALWAYS VARCHAR(128) DEFAULT 'FALSE', + LAST_VISIT DATE NOT NULL, + VISIT_COUNT INTEGER DEFAULT 0, + DEFAULT_PROFILE_NAME VARCHAR(255) DEFAULT 'DEFAULT', + PRIMARY KEY (USER_NAME, TENANT_ID, RP_URL) +)ENGINE INNODB; + +CREATE TABLE IF NOT EXISTS IDN_OPENID_ASSOCIATIONS ( + HANDLE VARCHAR(255) NOT NULL, + ASSOC_TYPE VARCHAR(255) NOT NULL, + EXPIRE_IN TIMESTAMP NOT NULL, + MAC_KEY VARCHAR(255) NOT NULL, + ASSOC_STORE VARCHAR(128) DEFAULT 'SHARED', + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY (HANDLE) +)ENGINE INNODB; + +CREATE TABLE IF NOT EXISTS IDN_STS_STORE ( + ID INTEGER AUTO_INCREMENT, + TOKEN_ID VARCHAR(255) NOT NULL, + TOKEN_CONTENT BLOB(1024) NOT NULL, + CREATE_DATE TIMESTAMP NOT NULL, + EXPIRE_DATE TIMESTAMP NOT NULL, + STATE INTEGER DEFAULT 0, + PRIMARY KEY (ID) +)ENGINE INNODB; + +CREATE TABLE IF NOT EXISTS IDN_IDENTITY_USER_DATA ( + TENANT_ID INTEGER DEFAULT -1234, + USER_NAME VARCHAR(255) NOT NULL, + DATA_KEY VARCHAR(255) NOT NULL, + DATA_VALUE VARCHAR(255), + PRIMARY KEY (TENANT_ID, USER_NAME, DATA_KEY) +)ENGINE INNODB; + +CREATE TABLE IF NOT EXISTS IDN_IDENTITY_META_DATA ( + USER_NAME VARCHAR(255) NOT NULL, + TENANT_ID INTEGER DEFAULT -1234, + METADATA_TYPE VARCHAR(255) NOT NULL, + METADATA VARCHAR(255) NOT NULL, + VALID VARCHAR(255) NOT NULL, + PRIMARY KEY (TENANT_ID, USER_NAME, METADATA_TYPE,METADATA) +)ENGINE INNODB; + +CREATE TABLE IF NOT EXISTS IDN_THRIFT_SESSION ( + SESSION_ID VARCHAR(255) NOT NULL, + USER_NAME VARCHAR(255) NOT NULL, + CREATED_TIME VARCHAR(255) NOT NULL, + LAST_MODIFIED_TIME VARCHAR(255) NOT NULL, + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY (SESSION_ID) +)ENGINE INNODB; + +CREATE TABLE IF NOT EXISTS IDN_AUTH_SESSION_STORE ( + SESSION_ID VARCHAR (100) NOT NULL, + SESSION_TYPE VARCHAR(100) NOT NULL, + OPERATION VARCHAR(10) NOT NULL, + SESSION_OBJECT BLOB, + TIME_CREATED BIGINT, + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY (SESSION_ID, SESSION_TYPE, TIME_CREATED, OPERATION) +)ENGINE INNODB; + +CREATE TABLE IF NOT EXISTS SP_APP ( + ID INTEGER NOT NULL AUTO_INCREMENT, + TENANT_ID INTEGER NOT NULL, + APP_NAME VARCHAR (255) NOT NULL , + USER_STORE VARCHAR (255) NOT NULL, + USERNAME VARCHAR (255) NOT NULL , + DESCRIPTION VARCHAR (1024), + ROLE_CLAIM VARCHAR (512), + AUTH_TYPE VARCHAR (255) NOT NULL, + PROVISIONING_USERSTORE_DOMAIN VARCHAR (512), + IS_LOCAL_CLAIM_DIALECT CHAR(1) DEFAULT '1', + IS_SEND_LOCAL_SUBJECT_ID CHAR(1) DEFAULT '0', + IS_SEND_AUTH_LIST_OF_IDPS CHAR(1) DEFAULT '0', + IS_USE_TENANT_DOMAIN_SUBJECT CHAR(1) DEFAULT '1', + IS_USE_USER_DOMAIN_SUBJECT CHAR(1) DEFAULT '1', + SUBJECT_CLAIM_URI VARCHAR (512), + IS_SAAS_APP CHAR(1) DEFAULT '0', + IS_DUMB_MODE CHAR(1) DEFAULT '0', + PRIMARY KEY (ID) +)ENGINE INNODB; + +ALTER TABLE SP_APP ADD CONSTRAINT APPLICATION_NAME_CONSTRAINT UNIQUE(APP_NAME, TENANT_ID); + +CREATE TABLE IF NOT EXISTS SP_METADATA ( + ID INTEGER AUTO_INCREMENT, + SP_ID INTEGER, + NAME VARCHAR(255) NOT NULL, + VALUE VARCHAR(255) NOT NULL, + DISPLAY_NAME VARCHAR(255), + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY (ID), + CONSTRAINT SP_METADATA_CONSTRAINT UNIQUE (SP_ID, NAME), + FOREIGN KEY (SP_ID) REFERENCES SP_APP(ID) ON DELETE CASCADE +)ENGINE INNODB; + +CREATE TABLE IF NOT EXISTS SP_INBOUND_AUTH ( + ID INTEGER NOT NULL AUTO_INCREMENT, + TENANT_ID INTEGER NOT NULL, + INBOUND_AUTH_KEY VARCHAR (255) NOT NULL, + INBOUND_AUTH_TYPE VARCHAR (255) NOT NULL, + PROP_NAME VARCHAR (255), + PROP_VALUE VARCHAR (1024) , + APP_ID INTEGER NOT NULL, + PRIMARY KEY (ID) +)ENGINE INNODB; + +ALTER TABLE SP_INBOUND_AUTH ADD CONSTRAINT APPLICATION_ID_CONSTRAINT FOREIGN KEY (APP_ID) REFERENCES SP_APP (ID) ON DELETE CASCADE; + +CREATE TABLE IF NOT EXISTS SP_AUTH_STEP ( + ID INTEGER NOT NULL AUTO_INCREMENT, + TENANT_ID INTEGER NOT NULL, + STEP_ORDER INTEGER DEFAULT 1, + APP_ID INTEGER NOT NULL , + IS_SUBJECT_STEP CHAR(1) DEFAULT '0', + IS_ATTRIBUTE_STEP CHAR(1) DEFAULT '0', + PRIMARY KEY (ID) +)ENGINE INNODB; + +ALTER TABLE SP_AUTH_STEP ADD CONSTRAINT APPLICATION_ID_CONSTRAINT_STEP FOREIGN KEY (APP_ID) REFERENCES SP_APP (ID) ON DELETE CASCADE; + +CREATE TABLE IF NOT EXISTS SP_FEDERATED_IDP ( + ID INTEGER NOT NULL, + TENANT_ID INTEGER NOT NULL, + AUTHENTICATOR_ID INTEGER NOT NULL, + PRIMARY KEY (ID, AUTHENTICATOR_ID) +)ENGINE INNODB; + +ALTER TABLE SP_FEDERATED_IDP ADD CONSTRAINT STEP_ID_CONSTRAINT FOREIGN KEY (ID) REFERENCES SP_AUTH_STEP (ID) ON DELETE CASCADE; + +CREATE TABLE IF NOT EXISTS SP_CLAIM_MAPPING ( + ID INTEGER NOT NULL AUTO_INCREMENT, + TENANT_ID INTEGER NOT NULL, + IDP_CLAIM VARCHAR (512) NOT NULL , + SP_CLAIM VARCHAR (512) NOT NULL , + APP_ID INTEGER NOT NULL, + IS_REQUESTED VARCHAR(128) DEFAULT '0', + DEFAULT_VALUE VARCHAR(255), + PRIMARY KEY (ID) +)ENGINE INNODB; + +ALTER TABLE SP_CLAIM_MAPPING ADD CONSTRAINT CLAIMID_APPID_CONSTRAINT FOREIGN KEY (APP_ID) REFERENCES SP_APP (ID) ON DELETE CASCADE; + +CREATE TABLE IF NOT EXISTS SP_ROLE_MAPPING ( + ID INTEGER NOT NULL AUTO_INCREMENT, + TENANT_ID INTEGER NOT NULL, + IDP_ROLE VARCHAR (255) NOT NULL , + SP_ROLE VARCHAR (255) NOT NULL , + APP_ID INTEGER NOT NULL, + PRIMARY KEY (ID) +)ENGINE INNODB; + +ALTER TABLE SP_ROLE_MAPPING ADD CONSTRAINT ROLEID_APPID_CONSTRAINT FOREIGN KEY (APP_ID) REFERENCES SP_APP (ID) ON DELETE CASCADE; + +CREATE TABLE IF NOT EXISTS SP_REQ_PATH_AUTHENTICATOR ( + ID INTEGER NOT NULL AUTO_INCREMENT, + TENANT_ID INTEGER NOT NULL, + AUTHENTICATOR_NAME VARCHAR (255) NOT NULL , + APP_ID INTEGER NOT NULL, + PRIMARY KEY (ID) +)ENGINE INNODB; + +ALTER TABLE SP_REQ_PATH_AUTHENTICATOR ADD CONSTRAINT REQ_AUTH_APPID_CONSTRAINT FOREIGN KEY (APP_ID) REFERENCES SP_APP (ID) ON DELETE CASCADE; + +CREATE TABLE IF NOT EXISTS SP_PROVISIONING_CONNECTOR ( + ID INTEGER NOT NULL AUTO_INCREMENT, + TENANT_ID INTEGER NOT NULL, + IDP_NAME VARCHAR (255) NOT NULL , + CONNECTOR_NAME VARCHAR (255) NOT NULL , + APP_ID INTEGER NOT NULL, + IS_JIT_ENABLED CHAR(1) NOT NULL DEFAULT '0', + BLOCKING CHAR(1) NOT NULL DEFAULT '0', + PRIMARY KEY (ID) +)ENGINE INNODB; + +ALTER TABLE SP_PROVISIONING_CONNECTOR ADD CONSTRAINT PRO_CONNECTOR_APPID_CONSTRAINT FOREIGN KEY (APP_ID) REFERENCES SP_APP (ID) ON DELETE CASCADE; + +CREATE TABLE IF NOT EXISTS IDP ( + ID INTEGER AUTO_INCREMENT, + TENANT_ID INTEGER, + NAME VARCHAR(254) NOT NULL, + IS_ENABLED CHAR(1) NOT NULL DEFAULT '1', + IS_PRIMARY CHAR(1) NOT NULL DEFAULT '0', + HOME_REALM_ID VARCHAR(254), + IMAGE MEDIUMBLOB, + CERTIFICATE BLOB, + ALIAS VARCHAR(254), + INBOUND_PROV_ENABLED CHAR (1) NOT NULL DEFAULT '0', + INBOUND_PROV_USER_STORE_ID VARCHAR(254), + USER_CLAIM_URI VARCHAR(254), + ROLE_CLAIM_URI VARCHAR(254), + DESCRIPTION VARCHAR (1024), + DEFAULT_AUTHENTICATOR_NAME VARCHAR(254), + DEFAULT_PRO_CONNECTOR_NAME VARCHAR(254), + PROVISIONING_ROLE VARCHAR(128), + IS_FEDERATION_HUB CHAR(1) NOT NULL DEFAULT '0', + IS_LOCAL_CLAIM_DIALECT CHAR(1) NOT NULL DEFAULT '0', + DISPLAY_NAME VARCHAR(255), + PRIMARY KEY (ID), + UNIQUE (TENANT_ID, NAME) +)ENGINE INNODB; + +INSERT INTO IDP (TENANT_ID, NAME, HOME_REALM_ID) VALUES (-1234, 'LOCAL', 'localhost'); + +CREATE TABLE IF NOT EXISTS IDP_ROLE ( + ID INTEGER AUTO_INCREMENT, + IDP_ID INTEGER, + TENANT_ID INTEGER, + ROLE VARCHAR(254), + PRIMARY KEY (ID), + UNIQUE (IDP_ID, ROLE), + FOREIGN KEY (IDP_ID) REFERENCES IDP(ID) ON DELETE CASCADE +)ENGINE INNODB; + +CREATE TABLE IF NOT EXISTS IDP_ROLE_MAPPING ( + ID INTEGER AUTO_INCREMENT, + IDP_ROLE_ID INTEGER, + TENANT_ID INTEGER, + USER_STORE_ID VARCHAR (253), + LOCAL_ROLE VARCHAR(253), + PRIMARY KEY (ID), + UNIQUE (IDP_ROLE_ID, TENANT_ID, USER_STORE_ID, LOCAL_ROLE), + FOREIGN KEY (IDP_ROLE_ID) REFERENCES IDP_ROLE(ID) ON DELETE CASCADE +)ENGINE INNODB; + +CREATE TABLE IF NOT EXISTS IDP_CLAIM ( + ID INTEGER AUTO_INCREMENT, + IDP_ID INTEGER, + TENANT_ID INTEGER, + CLAIM VARCHAR(254), + PRIMARY KEY (ID), + UNIQUE (IDP_ID, CLAIM), + FOREIGN KEY (IDP_ID) REFERENCES IDP(ID) ON DELETE CASCADE +)ENGINE INNODB; + +CREATE TABLE IF NOT EXISTS IDP_CLAIM_MAPPING ( + ID INTEGER AUTO_INCREMENT, + IDP_CLAIM_ID INTEGER, + TENANT_ID INTEGER, + LOCAL_CLAIM VARCHAR(253), + DEFAULT_VALUE VARCHAR(255), + IS_REQUESTED VARCHAR(128) DEFAULT '0', + PRIMARY KEY (ID), + UNIQUE (IDP_CLAIM_ID, TENANT_ID, LOCAL_CLAIM), + FOREIGN KEY (IDP_CLAIM_ID) REFERENCES IDP_CLAIM(ID) ON DELETE CASCADE +)ENGINE INNODB; + +CREATE TABLE IF NOT EXISTS IDP_AUTHENTICATOR ( + ID INTEGER AUTO_INCREMENT, + TENANT_ID INTEGER, + IDP_ID INTEGER, + NAME VARCHAR(255) NOT NULL, + IS_ENABLED CHAR (1) DEFAULT '1', + DISPLAY_NAME VARCHAR(255), + PRIMARY KEY (ID), + UNIQUE (TENANT_ID, IDP_ID, NAME), + FOREIGN KEY (IDP_ID) REFERENCES IDP(ID) ON DELETE CASCADE +)ENGINE INNODB; + +INSERT INTO IDP_AUTHENTICATOR (TENANT_ID, IDP_ID, NAME) VALUES (-1234, 1, 'samlsso'); +INSERT INTO IDP_AUTHENTICATOR (TENANT_ID, IDP_ID, NAME) VALUES (-1234, 1, 'IDPProperties'); +INSERT INTO IDP_AUTHENTICATOR (TENANT_ID, IDP_ID, NAME) VALUES (-1234, 1, 'passivests'); + +CREATE TABLE IF NOT EXISTS IDP_METADATA ( + ID INTEGER AUTO_INCREMENT, + IDP_ID INTEGER, + NAME VARCHAR(255) NOT NULL, + VALUE VARCHAR(255) NOT NULL, + DISPLAY_NAME VARCHAR(255), + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY (ID), + CONSTRAINT IDP_METADATA_CONSTRAINT UNIQUE (IDP_ID, NAME), + FOREIGN KEY (IDP_ID) REFERENCES IDP(ID) ON DELETE CASCADE +)ENGINE INNODB; + +INSERT INTO IDP_METADATA (IDP_ID, NAME, VALUE, DISPLAY_NAME) VALUES (1, 'SessionIdleTimeout', '20160', 'Session Idle Timeout'); +INSERT INTO IDP_METADATA (IDP_ID, NAME, VALUE, DISPLAY_NAME) VALUES (1, 'RememberMeTimeout', '15', 'RememberMe Timeout'); + +CREATE TABLE IF NOT EXISTS IDP_AUTHENTICATOR_PROPERTY ( + ID INTEGER AUTO_INCREMENT, + TENANT_ID INTEGER, + AUTHENTICATOR_ID INTEGER, + PROPERTY_KEY VARCHAR(255) NOT NULL, + PROPERTY_VALUE VARCHAR(2047), + IS_SECRET CHAR (1) DEFAULT '0', + PRIMARY KEY (ID), + UNIQUE (TENANT_ID, AUTHENTICATOR_ID, PROPERTY_KEY), + FOREIGN KEY (AUTHENTICATOR_ID) REFERENCES IDP_AUTHENTICATOR(ID) ON DELETE CASCADE +)ENGINE INNODB; + +INSERT INTO IDP_AUTHENTICATOR_PROPERTY (TENANT_ID, AUTHENTICATOR_ID, PROPERTY_KEY,PROPERTY_VALUE, IS_SECRET ) VALUES (-1234, 1 , 'IdPEntityId', 'localhost', '0'); +INSERT INTO IDP_AUTHENTICATOR_PROPERTY (TENANT_ID, AUTHENTICATOR_ID, PROPERTY_KEY,PROPERTY_VALUE, IS_SECRET ) VALUES (-1234, 3 , 'IdPEntityId', 'localhost', '0'); + +CREATE TABLE IF NOT EXISTS IDP_PROVISIONING_CONFIG ( + ID INTEGER AUTO_INCREMENT, + TENANT_ID INTEGER, + IDP_ID INTEGER, + PROVISIONING_CONNECTOR_TYPE VARCHAR(255) NOT NULL, + IS_ENABLED CHAR (1) DEFAULT '0', + IS_BLOCKING CHAR (1) DEFAULT '0', + PRIMARY KEY (ID), + UNIQUE (TENANT_ID, IDP_ID, PROVISIONING_CONNECTOR_TYPE), + FOREIGN KEY (IDP_ID) REFERENCES IDP(ID) ON DELETE CASCADE +)ENGINE INNODB; + +CREATE TABLE IF NOT EXISTS IDP_PROV_CONFIG_PROPERTY ( + ID INTEGER AUTO_INCREMENT, + TENANT_ID INTEGER, + PROVISIONING_CONFIG_ID INTEGER, + PROPERTY_KEY VARCHAR(255) NOT NULL, + PROPERTY_VALUE VARCHAR(2048), + PROPERTY_BLOB_VALUE BLOB, + PROPERTY_TYPE CHAR(32) NOT NULL, + IS_SECRET CHAR (1) DEFAULT '0', + PRIMARY KEY (ID), + UNIQUE (TENANT_ID, PROVISIONING_CONFIG_ID, PROPERTY_KEY), + FOREIGN KEY (PROVISIONING_CONFIG_ID) REFERENCES IDP_PROVISIONING_CONFIG(ID) ON DELETE CASCADE +)ENGINE INNODB; + +CREATE TABLE IF NOT EXISTS IDP_PROVISIONING_ENTITY ( + ID INTEGER AUTO_INCREMENT, + PROVISIONING_CONFIG_ID INTEGER, + ENTITY_TYPE VARCHAR(255) NOT NULL, + ENTITY_LOCAL_USERSTORE VARCHAR(255) NOT NULL, + ENTITY_NAME VARCHAR(255) NOT NULL, + ENTITY_VALUE VARCHAR(255), + TENANT_ID INTEGER, + ENTITY_LOCAL_ID VARCHAR(255), + PRIMARY KEY (ID), + UNIQUE (ENTITY_TYPE, TENANT_ID, ENTITY_LOCAL_USERSTORE, ENTITY_NAME, PROVISIONING_CONFIG_ID), + UNIQUE (PROVISIONING_CONFIG_ID, ENTITY_TYPE, ENTITY_VALUE), + FOREIGN KEY (PROVISIONING_CONFIG_ID) REFERENCES IDP_PROVISIONING_CONFIG(ID) ON DELETE CASCADE +)ENGINE INNODB; + +CREATE TABLE IF NOT EXISTS IDP_LOCAL_CLAIM ( + ID INTEGER AUTO_INCREMENT, + TENANT_ID INTEGER, + IDP_ID INTEGER, + CLAIM_URI VARCHAR(255) NOT NULL, + DEFAULT_VALUE VARCHAR(255), + IS_REQUESTED VARCHAR(128) DEFAULT '0', + PRIMARY KEY (ID), + UNIQUE (TENANT_ID, IDP_ID, CLAIM_URI), + FOREIGN KEY (IDP_ID) REFERENCES IDP(ID) ON DELETE CASCADE +)ENGINE INNODB; + +CREATE TABLE IF NOT EXISTS IDN_ASSOCIATED_ID ( + ID INTEGER AUTO_INCREMENT, + IDP_USER_ID VARCHAR(255) NOT NULL, + TENANT_ID INTEGER DEFAULT -1234, + IDP_ID INTEGER NOT NULL, + DOMAIN_NAME VARCHAR(255) NOT NULL, + USER_NAME VARCHAR(255) NOT NULL, + PRIMARY KEY (ID), + UNIQUE(IDP_USER_ID, TENANT_ID, IDP_ID), + FOREIGN KEY (IDP_ID) REFERENCES IDP(ID) ON DELETE CASCADE +)ENGINE INNODB; + +CREATE TABLE IF NOT EXISTS IDN_USER_ACCOUNT_ASSOCIATION ( + ASSOCIATION_KEY VARCHAR(255) NOT NULL, + TENANT_ID INTEGER, + DOMAIN_NAME VARCHAR(255) NOT NULL, + USER_NAME VARCHAR(255) NOT NULL, + PRIMARY KEY (TENANT_ID, DOMAIN_NAME, USER_NAME) +)ENGINE INNODB; + +CREATE TABLE IF NOT EXISTS FIDO_DEVICE_STORE ( + TENANT_ID INTEGER, + DOMAIN_NAME VARCHAR(255) NOT NULL, + USER_NAME VARCHAR(45) NOT NULL, + TIME_REGISTERED TIMESTAMP, + KEY_HANDLE VARCHAR(200) NOT NULL, + DEVICE_DATA VARCHAR(2048) NOT NULL, + PRIMARY KEY (TENANT_ID, DOMAIN_NAME, USER_NAME, KEY_HANDLE) + )ENGINE INNODB; + +CREATE TABLE IF NOT EXISTS WF_REQUEST ( + UUID VARCHAR (45), + CREATED_BY VARCHAR (255), + TENANT_ID INTEGER DEFAULT -1, + OPERATION_TYPE VARCHAR (50), + CREATED_AT TIMESTAMP, + UPDATED_AT TIMESTAMP, + STATUS VARCHAR (30), + REQUEST BLOB, + PRIMARY KEY (UUID) +)ENGINE INNODB; + +CREATE TABLE IF NOT EXISTS WF_BPS_PROFILE ( + PROFILE_NAME VARCHAR(45), + HOST_URL_MANAGER VARCHAR(45), + HOST_URL_WORKER VARCHAR(45), + USERNAME VARCHAR(45), + PASSWORD VARCHAR(255), + CALLBACK_HOST VARCHAR (45), + CALLBACK_USERNAME VARCHAR (45), + CALLBACK_PASSWORD VARCHAR (255), + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY (PROFILE_NAME, TENANT_ID) +)ENGINE INNODB; + +CREATE TABLE IF NOT EXISTS WF_WORKFLOW( + ID VARCHAR (45), + WF_NAME VARCHAR (45), + DESCRIPTION VARCHAR (255), + TEMPLATE_ID VARCHAR (45), + IMPL_ID VARCHAR (45), + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY (ID) +)ENGINE INNODB; + +CREATE TABLE IF NOT EXISTS WF_WORKFLOW_ASSOCIATION( + ID INTEGER NOT NULL AUTO_INCREMENT, + ASSOC_NAME VARCHAR (45), + EVENT_ID VARCHAR(45), + ASSOC_CONDITION VARCHAR (2000), + WORKFLOW_ID VARCHAR (45), + IS_ENABLED CHAR (1) DEFAULT '1', + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY(ID), + FOREIGN KEY (WORKFLOW_ID) REFERENCES WF_WORKFLOW(ID)ON DELETE CASCADE +)ENGINE INNODB; + +CREATE TABLE IF NOT EXISTS WF_WORKFLOW_CONFIG_PARAM( + WORKFLOW_ID VARCHAR (45), + PARAM_NAME VARCHAR (45), + PARAM_VALUE VARCHAR (1000), + PARAM_QNAME VARCHAR (45), + PARAM_HOLDER VARCHAR (45), + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY (WORKFLOW_ID, PARAM_NAME, PARAM_QNAME, PARAM_HOLDER), + FOREIGN KEY (WORKFLOW_ID) REFERENCES WF_WORKFLOW(ID)ON DELETE CASCADE +)ENGINE INNODB; + +CREATE TABLE IF NOT EXISTS WF_REQUEST_ENTITY_RELATIONSHIP( + REQUEST_ID VARCHAR (45), + ENTITY_NAME VARCHAR (255), + ENTITY_TYPE VARCHAR (50), + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY(REQUEST_ID, ENTITY_NAME, ENTITY_TYPE, TENANT_ID), + FOREIGN KEY (REQUEST_ID) REFERENCES WF_REQUEST(UUID)ON DELETE CASCADE +)ENGINE INNODB; + +CREATE TABLE IF NOT EXISTS WF_WORKFLOW_REQUEST_RELATION( + RELATIONSHIP_ID VARCHAR (45), + WORKFLOW_ID VARCHAR (45), + REQUEST_ID VARCHAR (45), + UPDATED_AT TIMESTAMP, + STATUS VARCHAR (30), + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY (RELATIONSHIP_ID), + FOREIGN KEY (WORKFLOW_ID) REFERENCES WF_WORKFLOW(ID)ON DELETE CASCADE, + FOREIGN KEY (REQUEST_ID) REFERENCES WF_REQUEST(UUID)ON DELETE CASCADE +)ENGINE INNODB; + +-- End of IDENTITY Tables-- + +-- Start of API-MGT Tables -- +CREATE TABLE IF NOT EXISTS AM_SUBSCRIBER ( + SUBSCRIBER_ID INTEGER AUTO_INCREMENT, + USER_ID VARCHAR(255) NOT NULL, + TENANT_ID INTEGER NOT NULL, + EMAIL_ADDRESS VARCHAR(256) NULL, + DATE_SUBSCRIBED TIMESTAMP NOT NULL, + PRIMARY KEY (SUBSCRIBER_ID), + CREATED_BY VARCHAR(100), + CREATED_TIME TIMESTAMP, + UPDATED_BY VARCHAR(100), + UPDATED_TIME TIMESTAMP, + UNIQUE (TENANT_ID,USER_ID) +)ENGINE INNODB; + +CREATE TABLE IF NOT EXISTS AM_APPLICATION ( + APPLICATION_ID INTEGER AUTO_INCREMENT, + NAME VARCHAR(100), + SUBSCRIBER_ID INTEGER, + APPLICATION_TIER VARCHAR(50) DEFAULT 'Unlimited', + CALLBACK_URL VARCHAR(512), + DESCRIPTION VARCHAR(512), + APPLICATION_STATUS VARCHAR(50) DEFAULT 'APPROVED', + GROUP_ID VARCHAR(100), + CREATED_BY VARCHAR(100), + CREATED_TIME TIMESTAMP, + UPDATED_BY VARCHAR(100), + UPDATED_TIME TIMESTAMP, + FOREIGN KEY(SUBSCRIBER_ID) REFERENCES AM_SUBSCRIBER(SUBSCRIBER_ID) ON UPDATE CASCADE ON DELETE RESTRICT, + PRIMARY KEY(APPLICATION_ID), + UNIQUE (NAME,SUBSCRIBER_ID) +)ENGINE INNODB; + +CREATE TABLE IF NOT EXISTS AM_API ( + API_ID INTEGER AUTO_INCREMENT, + API_PROVIDER VARCHAR(200), + API_NAME VARCHAR(200), + API_VERSION VARCHAR(30), + CONTEXT VARCHAR(256), + CONTEXT_TEMPLATE VARCHAR(256), + CREATED_BY VARCHAR(100), + CREATED_TIME TIMESTAMP, + UPDATED_BY VARCHAR(100), + UPDATED_TIME TIMESTAMP, + PRIMARY KEY(API_ID), + UNIQUE (API_PROVIDER,API_NAME,API_VERSION) +)ENGINE INNODB; + +CREATE TABLE IF NOT EXISTS AM_API_URL_MAPPING ( + URL_MAPPING_ID INTEGER AUTO_INCREMENT, + API_ID INTEGER NOT NULL, + HTTP_METHOD VARCHAR(20) NULL, + AUTH_SCHEME VARCHAR(50) NULL, + URL_PATTERN VARCHAR(512) NULL, + THROTTLING_TIER varchar(512) DEFAULT NULL, + MEDIATION_SCRIPT BLOB, + PRIMARY KEY (URL_MAPPING_ID) +)ENGINE INNODB; + +CREATE TABLE IF NOT EXISTS AM_SUBSCRIPTION ( + SUBSCRIPTION_ID INTEGER AUTO_INCREMENT, + TIER_ID VARCHAR(50), + API_ID INTEGER, + LAST_ACCESSED TIMESTAMP NULL, + APPLICATION_ID INTEGER, + SUB_STATUS VARCHAR(50), + SUBS_CREATE_STATE VARCHAR(50) DEFAULT 'SUBSCRIBE', + CREATED_BY VARCHAR(100), + CREATED_TIME TIMESTAMP, + UPDATED_BY VARCHAR(100), + UPDATED_TIME TIMESTAMP, + FOREIGN KEY(APPLICATION_ID) REFERENCES AM_APPLICATION(APPLICATION_ID) ON UPDATE CASCADE ON DELETE RESTRICT, + FOREIGN KEY(API_ID) REFERENCES AM_API(API_ID) ON UPDATE CASCADE ON DELETE RESTRICT, + PRIMARY KEY (SUBSCRIPTION_ID) +)ENGINE INNODB; + +CREATE TABLE IF NOT EXISTS AM_SUBSCRIPTION_KEY_MAPPING ( + SUBSCRIPTION_ID INTEGER, + ACCESS_TOKEN VARCHAR(255), + KEY_TYPE VARCHAR(512) NOT NULL, + FOREIGN KEY(SUBSCRIPTION_ID) REFERENCES AM_SUBSCRIPTION(SUBSCRIPTION_ID) ON UPDATE CASCADE ON DELETE RESTRICT, + PRIMARY KEY(SUBSCRIPTION_ID,ACCESS_TOKEN) +)ENGINE INNODB; + +CREATE TABLE IF NOT EXISTS AM_APPLICATION_KEY_MAPPING ( + APPLICATION_ID INTEGER, + CONSUMER_KEY VARCHAR(255), + KEY_TYPE VARCHAR(512) NOT NULL, + STATE VARCHAR(30) NOT NULL, + CREATE_MODE VARCHAR(30) DEFAULT 'CREATED', + FOREIGN KEY(APPLICATION_ID) REFERENCES AM_APPLICATION(APPLICATION_ID) ON UPDATE CASCADE ON DELETE RESTRICT, + PRIMARY KEY(APPLICATION_ID,KEY_TYPE) +)ENGINE INNODB; + +CREATE TABLE IF NOT EXISTS AM_API_LC_EVENT ( + EVENT_ID INTEGER AUTO_INCREMENT, + API_ID INTEGER NOT NULL, + PREVIOUS_STATE VARCHAR(50), + NEW_STATE VARCHAR(50) NOT NULL, + USER_ID VARCHAR(255) NOT NULL, + TENANT_ID INTEGER NOT NULL, + EVENT_DATE TIMESTAMP NOT NULL, + FOREIGN KEY(API_ID) REFERENCES AM_API(API_ID) ON UPDATE CASCADE ON DELETE RESTRICT, + PRIMARY KEY (EVENT_ID) +)ENGINE INNODB; + +CREATE TABLE AM_APP_KEY_DOMAIN_MAPPING ( + CONSUMER_KEY VARCHAR(255), + AUTHZ_DOMAIN VARCHAR(255) DEFAULT 'ALL', + PRIMARY KEY (CONSUMER_KEY,AUTHZ_DOMAIN) +)ENGINE INNODB; + +CREATE TABLE IF NOT EXISTS AM_API_COMMENTS ( + COMMENT_ID INTEGER AUTO_INCREMENT, + COMMENT_TEXT VARCHAR(512), + COMMENTED_USER VARCHAR(255), + DATE_COMMENTED TIMESTAMP NOT NULL, + API_ID INTEGER NOT NULL, + FOREIGN KEY(API_ID) REFERENCES AM_API(API_ID) ON UPDATE CASCADE ON DELETE RESTRICT, + PRIMARY KEY (COMMENT_ID) +)ENGINE INNODB; + +CREATE TABLE IF NOT EXISTS AM_API_RATINGS ( + RATING_ID INTEGER AUTO_INCREMENT, + API_ID INTEGER, + RATING INTEGER, + SUBSCRIBER_ID INTEGER, + FOREIGN KEY(API_ID) REFERENCES AM_API(API_ID) ON UPDATE CASCADE ON DELETE RESTRICT, + FOREIGN KEY(SUBSCRIBER_ID) REFERENCES AM_SUBSCRIBER(SUBSCRIBER_ID) ON UPDATE CASCADE ON DELETE RESTRICT, +PRIMARY KEY (RATING_ID) +)ENGINE INNODB; + +CREATE TABLE IF NOT EXISTS AM_TIER_PERMISSIONS ( + TIER_PERMISSIONS_ID INTEGER AUTO_INCREMENT, + TIER VARCHAR(50) NOT NULL, + PERMISSIONS_TYPE VARCHAR(50) NOT NULL, + ROLES VARCHAR(512) NOT NULL, + TENANT_ID INTEGER NOT NULL, + PRIMARY KEY(TIER_PERMISSIONS_ID) +)ENGINE INNODB; + +CREATE TABLE IF NOT EXISTS AM_EXTERNAL_STORES ( + APISTORE_ID INTEGER AUTO_INCREMENT, + API_ID INTEGER, + STORE_ID VARCHAR(255) NOT NULL, + STORE_DISPLAY_NAME VARCHAR(255) NOT NULL, + STORE_ENDPOINT VARCHAR(255) NOT NULL, + STORE_TYPE VARCHAR(255) NOT NULL, +FOREIGN KEY(API_ID) REFERENCES AM_API(API_ID) ON UPDATE CASCADE ON DELETE RESTRICT, +PRIMARY KEY (APISTORE_ID) +)ENGINE INNODB; + +CREATE TABLE IF NOT EXISTS AM_WORKFLOWS( + WF_ID INTEGER AUTO_INCREMENT, + WF_REFERENCE VARCHAR(255) NOT NULL, + WF_TYPE VARCHAR(255) NOT NULL, + WF_STATUS VARCHAR(255) NOT NULL, + WF_CREATED_TIME TIMESTAMP DEFAULT 0, + WF_UPDATED_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP , + WF_STATUS_DESC VARCHAR(1000), + TENANT_ID INTEGER, + TENANT_DOMAIN VARCHAR(255), + WF_EXTERNAL_REFERENCE VARCHAR(255) NOT NULL, + PRIMARY KEY (WF_ID), + UNIQUE (WF_EXTERNAL_REFERENCE) +)ENGINE INNODB; + +CREATE TABLE IF NOT EXISTS AM_APPLICATION_REGISTRATION ( + REG_ID INT AUTO_INCREMENT, + SUBSCRIBER_ID INT, + WF_REF VARCHAR(255) NOT NULL, + APP_ID INT, + TOKEN_TYPE VARCHAR(30), + TOKEN_SCOPE VARCHAR(256) DEFAULT 'default', + INPUTS VARCHAR(1000), + ALLOWED_DOMAINS VARCHAR(256), + VALIDITY_PERIOD BIGINT, + UNIQUE (SUBSCRIBER_ID,APP_ID,TOKEN_TYPE), + FOREIGN KEY(SUBSCRIBER_ID) REFERENCES AM_SUBSCRIBER(SUBSCRIBER_ID) ON UPDATE CASCADE ON DELETE RESTRICT, + FOREIGN KEY(APP_ID) REFERENCES AM_APPLICATION(APPLICATION_ID) ON UPDATE CASCADE ON DELETE RESTRICT, + PRIMARY KEY (REG_ID) +)ENGINE INNODB; + +CREATE TABLE IF NOT EXISTS AM_API_SCOPES ( + API_ID INTEGER NOT NULL, + SCOPE_ID INTEGER NOT NULL, + FOREIGN KEY (API_ID) REFERENCES AM_API (API_ID) ON DELETE CASCADE ON UPDATE CASCADE, + FOREIGN KEY (SCOPE_ID) REFERENCES IDN_OAUTH2_SCOPE (SCOPE_ID) ON DELETE CASCADE ON UPDATE CASCADE +)ENGINE = INNODB; + +CREATE TABLE IF NOT EXISTS AM_API_DEFAULT_VERSION ( + DEFAULT_VERSION_ID INT AUTO_INCREMENT, + API_NAME VARCHAR(256) NOT NULL , + API_PROVIDER VARCHAR(256) NOT NULL , + DEFAULT_API_VERSION VARCHAR(30) , + PUBLISHED_DEFAULT_API_VERSION VARCHAR(30) , + PRIMARY KEY (DEFAULT_VERSION_ID) +); + +CREATE INDEX IDX_SUB_APP_ID ON AM_SUBSCRIPTION (APPLICATION_ID, SUBSCRIPTION_ID); \ No newline at end of file diff --git a/modules/distribution/src/repository/resources/dbscripts/apimgt/oracle.sql b/modules/distribution/src/repository/resources/dbscripts/apimgt/oracle.sql new file mode 100644 index 00000000..badfa6cc --- /dev/null +++ b/modules/distribution/src/repository/resources/dbscripts/apimgt/oracle.sql @@ -0,0 +1,1256 @@ +-- Create Oracle New User and Connect +-------------------------------------- +-- CREATE USER apimuser IDENTIFIED BY wso2; +-- GRANT CONNECT,RESOURCE to apimuser WITH ADMIN OPTION; +-- CONNECT apimuser/wso2 +-- + +-- Start of IDN Tables -- + +CREATE TABLE IDN_BASE_TABLE ( + PRODUCT_NAME VARCHAR2 (20), + PRIMARY KEY (PRODUCT_NAME)) +/ +INSERT INTO IDN_BASE_TABLE values ('WSO2 Identity Server') +/ +CREATE TABLE IDN_OAUTH_CONSUMER_APPS ( + ID INTEGER, + CONSUMER_KEY VARCHAR2 (255), + CONSUMER_SECRET VARCHAR2 (512), + USERNAME VARCHAR2 (255), + TENANT_ID INTEGER DEFAULT 0, + USER_DOMAIN VARCHAR(50), + APP_NAME VARCHAR2 (255), + OAUTH_VERSION VARCHAR2 (128), + CALLBACK_URL VARCHAR2 (1024), + GRANT_TYPES VARCHAR (1024), + CONSTRAINT CONSUMER_KEY_CONSTRAINT UNIQUE (CONSUMER_KEY), + PRIMARY KEY (ID)) +/ +CREATE SEQUENCE IDN_OAUTH_CONSUMER_APPS_SEQ START WITH 1 INCREMENT BY 1 NOCACHE +/ +CREATE OR REPLACE TRIGGER IDN_OAUTH_CONSUMER_APPS_TRIG + BEFORE INSERT + ON IDN_OAUTH_CONSUMER_APPS + REFERENCING NEW AS NEW + FOR EACH ROW + BEGIN + SELECT IDN_OAUTH_CONSUMER_APPS_SEQ.nextval INTO :NEW.ID FROM dual; + END; +/ +CREATE TABLE IDN_OAUTH1A_REQUEST_TOKEN ( + REQUEST_TOKEN VARCHAR2 (512), + REQUEST_TOKEN_SECRET VARCHAR2 (512), + CONSUMER_KEY_ID INTEGER, + CALLBACK_URL VARCHAR2 (1024), + SCOPE VARCHAR2(2048), + AUTHORIZED VARCHAR2 (128), + OAUTH_VERIFIER VARCHAR2 (512), + AUTHZ_USER VARCHAR2 (512), + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY (REQUEST_TOKEN), + FOREIGN KEY (CONSUMER_KEY_ID) REFERENCES IDN_OAUTH_CONSUMER_APPS(ID) ON DELETE CASCADE) +/ +CREATE TABLE IDN_OAUTH1A_ACCESS_TOKEN ( + ACCESS_TOKEN VARCHAR2 (512), + ACCESS_TOKEN_SECRET VARCHAR2 (512), + CONSUMER_KEY_ID INTEGER, + SCOPE VARCHAR2(2048), + AUTHZ_USER VARCHAR2 (512), + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY (ACCESS_TOKEN), + FOREIGN KEY (CONSUMER_KEY_ID) REFERENCES IDN_OAUTH_CONSUMER_APPS(ID) ON DELETE CASCADE) +/ +CREATE TABLE IDN_OAUTH2_ACCESS_TOKEN ( + TOKEN_ID VARCHAR (255), + ACCESS_TOKEN VARCHAR2 (255), + REFRESH_TOKEN VARCHAR2 (255), + CONSUMER_KEY_ID INTEGER, + AUTHZ_USER VARCHAR2 (100), + TENANT_ID INTEGER, + USER_DOMAIN VARCHAR2 (50), + USER_TYPE VARCHAR (25), + GRANT_TYPE VARCHAR (50), + TIME_CREATED TIMESTAMP, + REFRESH_TOKEN_TIME_CREATED TIMESTAMP, + VALIDITY_PERIOD NUMBER(19), + REFRESH_TOKEN_VALIDITY_PERIOD NUMBER(19), + TOKEN_SCOPE_HASH VARCHAR2 (32), + TOKEN_STATE VARCHAR2 (25) DEFAULT 'ACTIVE', + TOKEN_STATE_ID VARCHAR (128) DEFAULT 'NONE', + PRIMARY KEY (TOKEN_ID), + FOREIGN KEY (CONSUMER_KEY_ID) REFERENCES IDN_OAUTH_CONSUMER_APPS(ID) ON DELETE CASCADE, + CONSTRAINT CON_APP_KEY UNIQUE (CONSUMER_KEY_ID,AUTHZ_USER,TOKEN_ID,USER_DOMAIN,USER_TYPE,TOKEN_SCOPE_HASH, + TOKEN_STATE,TOKEN_STATE_ID)) +/ +CREATE INDEX IDX_TC ON IDN_OAUTH2_ACCESS_TOKEN(TIME_CREATED) +/ +CREATE INDEX IDX_AT_CK_AU ON IDN_OAUTH2_ACCESS_TOKEN(CONSUMER_KEY_ID, AUTHZ_USER, TOKEN_STATE, USER_TYPE) +/ +CREATE TABLE IDN_OAUTH2_AUTHORIZATION_CODE ( + AUTHORIZATION_CODE VARCHAR2 (512), + CONSUMER_KEY_ID INTEGER, + CALLBACK_URL VARCHAR2 (1024), + SCOPE VARCHAR2(2048), + AUTHZ_USER VARCHAR2 (100), + TENANT_ID INTEGER, + USER_DOMAIN VARCHAR2 (50), + TIME_CREATED TIMESTAMP, + VALIDITY_PERIOD NUMBER(19), + STATE VARCHAR (25) DEFAULT 'ACTIVE', + TOKEN_ID VARCHAR(255), + PRIMARY KEY (AUTHORIZATION_CODE), + FOREIGN KEY (CONSUMER_KEY_ID) REFERENCES IDN_OAUTH_CONSUMER_APPS(ID) ON DELETE CASCADE) +/ +CREATE TABLE IDN_OAUTH2_ACCESS_TOKEN_SCOPE ( + TOKEN_ID VARCHAR2 (255), + TOKEN_SCOPE VARCHAR2 (60), + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY (TOKEN_ID, TOKEN_SCOPE), + FOREIGN KEY (TOKEN_ID) REFERENCES IDN_OAUTH2_ACCESS_TOKEN(TOKEN_ID) ON DELETE CASCADE) +/ +CREATE TABLE IDN_OAUTH2_SCOPE ( + SCOPE_ID INTEGER, + SCOPE_KEY VARCHAR2 (100) NOT NULL, + NAME VARCHAR2 (255) NULL, + DESCRIPTION VARCHAR2 (512) NULL, + TENANT_ID INTEGER DEFAULT 0, + ROLES VARCHAR2 (500) NULL, + PRIMARY KEY (SCOPE_ID)) +/ +CREATE SEQUENCE IDN_OAUTH2_SCOPE_SEQUENCE START WITH 1 INCREMENT BY 1 NOCACHE +/ +CREATE OR REPLACE TRIGGER IDN_OAUTH2_SCOPE_TRIGGER + BEFORE INSERT + ON IDN_OAUTH2_SCOPE + REFERENCING NEW AS NEW + FOR EACH ROW + BEGIN + SELECT IDN_OAUTH2_SCOPE_SEQUENCE.nextval INTO :NEW.SCOPE_ID FROM dual; + END; +/ +CREATE TABLE IDN_OAUTH2_RESOURCE_SCOPE ( + RESOURCE_PATH VARCHAR2 (255) NOT NULL, + SCOPE_ID INTEGER NOT NULL, + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY (RESOURCE_PATH), + FOREIGN KEY (SCOPE_ID) REFERENCES IDN_OAUTH2_SCOPE (SCOPE_ID)) +/ +CREATE TABLE IDN_SCIM_GROUP ( + ID INTEGER, + TENANT_ID INTEGER NOT NULL, + ROLE_NAME VARCHAR2(255) NOT NULL, + ATTR_NAME VARCHAR2(1024) NOT NULL, + ATTR_VALUE VARCHAR2(1024), + PRIMARY KEY (ID)) +/ +CREATE SEQUENCE IDN_SCIM_GROUP_SEQUENCE START WITH 1 INCREMENT BY 1 NOCACHE +/ + +CREATE OR REPLACE TRIGGER IDN_SCIM_GROUP_TRIGGER + BEFORE INSERT + ON IDN_SCIM_GROUP + REFERENCING NEW AS NEW + FOR EACH ROW + BEGIN + SELECT IDN_SCIM_GROUP_SEQUENCE.nextval INTO :NEW.ID FROM dual; + END; +/ +CREATE TABLE IDN_OPENID_REMEMBER_ME ( + USER_NAME VARCHAR(255) NOT NULL, + TENANT_ID INTEGER DEFAULT 0, + COOKIE_VALUE VARCHAR(1024), + CREATED_TIME TIMESTAMP, + PRIMARY KEY (USER_NAME, TENANT_ID)) +/ +CREATE TABLE IDN_OPENID_USER_RPS ( + USER_NAME VARCHAR(255) NOT NULL, + TENANT_ID INTEGER DEFAULT 0, + RP_URL VARCHAR(255) NOT NULL, + TRUSTED_ALWAYS VARCHAR(128) DEFAULT 'FALSE', + LAST_VISIT DATE NOT NULL, + VISIT_COUNT INTEGER DEFAULT 0, + DEFAULT_PROFILE_NAME VARCHAR(255) DEFAULT 'DEFAULT', + PRIMARY KEY (USER_NAME, TENANT_ID, RP_URL)) +/ +CREATE TABLE IDN_OPENID_ASSOCIATIONS ( + HANDLE VARCHAR(255) NOT NULL, + ASSOC_TYPE VARCHAR(255) NOT NULL, + EXPIRE_IN TIMESTAMP NOT NULL, + MAC_KEY VARCHAR(255) NOT NULL, + ASSOC_STORE VARCHAR(128) DEFAULT 'SHARED', + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY (HANDLE)) +/ +CREATE TABLE IDN_STS_STORE ( + ID INTEGER, + TOKEN_ID VARCHAR(255) NOT NULL, + TOKEN_CONTENT BLOB NOT NULL, + CREATE_DATE TIMESTAMP NOT NULL, + EXPIRE_DATE TIMESTAMP NOT NULL, + STATE INTEGER DEFAULT 0, + PRIMARY KEY (ID)) +/ +CREATE SEQUENCE IDN_STS_STORE_SEQUENCE START WITH 1 INCREMENT BY 1 NOCACHE +/ + +CREATE OR REPLACE TRIGGER IDN_STS_STORE_TRIGGER + BEFORE INSERT + ON IDN_STS_STORE + REFERENCING NEW AS NEW + FOR EACH ROW + BEGIN + SELECT IDN_STS_STORE_SEQUENCE.nextval INTO :NEW.ID FROM dual; + END; +/ +CREATE TABLE IDN_IDENTITY_USER_DATA ( + TENANT_ID INTEGER DEFAULT -1234, + USER_NAME VARCHAR(255) NOT NULL, + DATA_KEY VARCHAR(255) NOT NULL, + DATA_VALUE VARCHAR(255), + PRIMARY KEY (TENANT_ID, USER_NAME, DATA_KEY)) +/ +CREATE TABLE IDN_IDENTITY_META_DATA ( + USER_NAME VARCHAR(255) NOT NULL, + TENANT_ID INTEGER DEFAULT -1234, + METADATA_TYPE VARCHAR(255) NOT NULL, + METADATA VARCHAR(255) NOT NULL, + VALID VARCHAR(255) NOT NULL, + PRIMARY KEY (TENANT_ID, USER_NAME, METADATA_TYPE,METADATA)) +/ +CREATE TABLE IDN_THRIFT_SESSION ( + SESSION_ID VARCHAR2(255) NOT NULL, + USER_NAME VARCHAR2(255) NOT NULL, + CREATED_TIME VARCHAR2(255) NOT NULL, + LAST_MODIFIED_TIME VARCHAR2(255) NOT NULL, + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY (SESSION_ID) +) +/ +CREATE TABLE IDN_AUTH_SESSION_STORE ( + SESSION_ID VARCHAR (100) NOT NULL, + SESSION_TYPE VARCHAR(100) NOT NULL, + OPERATION VARCHAR(10) NOT NULL, + SESSION_OBJECT BLOB, + TIME_CREATED NUMBER(19), + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY (SESSION_ID, SESSION_TYPE, TIME_CREATED, OPERATION) +) +/ +CREATE TABLE SP_APP ( + ID INTEGER, + TENANT_ID INTEGER NOT NULL, + APP_NAME VARCHAR (255) NOT NULL , + USER_STORE VARCHAR (255) NOT NULL, + USERNAME VARCHAR (255) NOT NULL , + DESCRIPTION VARCHAR (1024), + ROLE_CLAIM VARCHAR (512), + AUTH_TYPE VARCHAR (255) NOT NULL, + PROVISIONING_USERSTORE_DOMAIN VARCHAR (512), + IS_LOCAL_CLAIM_DIALECT CHAR(1) DEFAULT '1', + IS_SEND_LOCAL_SUBJECT_ID CHAR(1) DEFAULT '0', + IS_SEND_AUTH_LIST_OF_IDPS CHAR(1) DEFAULT '0', + IS_USE_TENANT_DOMAIN_SUBJECT CHAR(1) DEFAULT '1', + IS_USE_USER_DOMAIN_SUBJECT CHAR(1) DEFAULT '1', + SUBJECT_CLAIM_URI VARCHAR (512), + IS_SAAS_APP CHAR(1) DEFAULT '0', + IS_DUMB_MODE CHAR(1) DEFAULT '0', + PRIMARY KEY (ID)) +/ +CREATE SEQUENCE SP_APP_SEQ START WITH 1 INCREMENT BY 1 NOCACHE +/ +CREATE OR REPLACE TRIGGER SP_APP_TRIG + BEFORE INSERT + ON SP_APP + REFERENCING NEW AS NEW + FOR EACH ROW + BEGIN + SELECT SP_APP_SEQ.nextval INTO :NEW.ID FROM dual; + END; +/ +ALTER TABLE SP_APP ADD CONSTRAINT APPLICATION_NAME_CONSTRAINT UNIQUE(APP_NAME, TENANT_ID) +/ + + +CREATE TABLE SP_METADATA ( + ID INTEGER, + SP_ID INTEGER, + NAME VARCHAR(255) NOT NULL, + VALUE VARCHAR(255) NOT NULL, + DISPLAY_NAME VARCHAR(255), + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY (ID), + CONSTRAINT SP_METADATA_CONSTRAINT UNIQUE (SP_ID, NAME), + FOREIGN KEY (SP_ID) REFERENCES SP_APP(ID) ON DELETE CASCADE) +/ +CREATE SEQUENCE SP_METADATA_SEQ START WITH 1 INCREMENT BY 1 NOCACHE +/ +CREATE OR REPLACE TRIGGER SP_METADATA_TRIG + BEFORE INSERT + ON SP_METADATA + REFERENCING NEW AS NEW + FOR EACH ROW + BEGIN + SELECT SP_METADATA_SEQ.nextval INTO :NEW.ID FROM dual; + END; +/ + +CREATE TABLE SP_INBOUND_AUTH ( + ID INTEGER, + TENANT_ID INTEGER NOT NULL, + INBOUND_AUTH_KEY VARCHAR (255) NOT NULL, + INBOUND_AUTH_TYPE VARCHAR (255) NOT NULL, + PROP_NAME VARCHAR (255), + PROP_VALUE VARCHAR (1024) , + APP_ID INTEGER NOT NULL, + PRIMARY KEY (ID)) +/ +CREATE SEQUENCE SP_INBOUND_AUTH_SEQ START WITH 1 INCREMENT BY 1 NOCACHE +/ +CREATE OR REPLACE TRIGGER SP_INBOUND_AUTH_TRIG + BEFORE INSERT + ON SP_INBOUND_AUTH + REFERENCING NEW AS NEW + FOR EACH ROW + BEGIN + SELECT SP_INBOUND_AUTH_SEQ.nextval INTO :NEW.ID FROM dual; + END; +/ +ALTER TABLE SP_INBOUND_AUTH ADD CONSTRAINT APPLICATION_ID_CONSTRAINT FOREIGN KEY (APP_ID) REFERENCES SP_APP (ID) ON DELETE CASCADE +/ +CREATE TABLE SP_AUTH_STEP ( + ID INTEGER, + TENANT_ID INTEGER NOT NULL, + STEP_ORDER INTEGER DEFAULT 1, + APP_ID INTEGER NOT NULL, + IS_SUBJECT_STEP CHAR(1) DEFAULT '0', + IS_ATTRIBUTE_STEP CHAR(1) DEFAULT '0', + PRIMARY KEY (ID)) +/ +CREATE SEQUENCE SP_AUTH_STEP_SEQ START WITH 1 INCREMENT BY 1 NOCACHE +/ +CREATE OR REPLACE TRIGGER SP_AUTH_STEP_TRIG + BEFORE INSERT + ON SP_AUTH_STEP + REFERENCING NEW AS NEW + FOR EACH ROW + BEGIN + SELECT SP_AUTH_STEP_SEQ.nextval INTO :NEW.ID FROM dual; + END; +/ +ALTER TABLE SP_AUTH_STEP ADD CONSTRAINT APPLICATION_ID_CONSTRAINT_STEP FOREIGN KEY (APP_ID) REFERENCES SP_APP (ID) ON DELETE CASCADE +/ +CREATE TABLE SP_FEDERATED_IDP ( + ID INTEGER NOT NULL, + TENANT_ID INTEGER NOT NULL, + AUTHENTICATOR_ID INTEGER NOT NULL, + PRIMARY KEY (ID, AUTHENTICATOR_ID)) +/ +ALTER TABLE SP_FEDERATED_IDP ADD CONSTRAINT STEP_ID_CONSTRAINT FOREIGN KEY (ID) REFERENCES SP_AUTH_STEP (ID) ON DELETE CASCADE +/ +CREATE TABLE SP_CLAIM_MAPPING ( + ID INTEGER, + TENANT_ID INTEGER NOT NULL, + IDP_CLAIM VARCHAR (512) NOT NULL , + SP_CLAIM VARCHAR (512) NOT NULL , + APP_ID INTEGER NOT NULL, + IS_REQUESTED VARCHAR(128) DEFAULT '0', + DEFAULT_VALUE VARCHAR(255), + PRIMARY KEY (ID)) +/ +CREATE SEQUENCE SP_CLAIM_MAPPING_SEQ START WITH 1 INCREMENT BY 1 NOCACHE +/ +CREATE OR REPLACE TRIGGER SP_CLAIM_MAPPING_TRIG + BEFORE INSERT + ON SP_CLAIM_MAPPING + REFERENCING NEW AS NEW + FOR EACH ROW + BEGIN + SELECT SP_CLAIM_MAPPING_SEQ.nextval INTO :NEW.ID FROM dual; + END; +/ +ALTER TABLE SP_CLAIM_MAPPING ADD CONSTRAINT CLAIMID_APPID_CONSTRAINT FOREIGN KEY (APP_ID) REFERENCES SP_APP (ID) ON DELETE CASCADE +/ +CREATE TABLE SP_ROLE_MAPPING ( + ID INTEGER, + TENANT_ID INTEGER NOT NULL, + IDP_ROLE VARCHAR (255) NOT NULL , + SP_ROLE VARCHAR (255) NOT NULL , + APP_ID INTEGER NOT NULL, + PRIMARY KEY (ID)) +/ +CREATE SEQUENCE SP_ROLE_MAPPING_SEQ START WITH 1 INCREMENT BY 1 NOCACHE +/ +CREATE OR REPLACE TRIGGER SP_ROLE_MAPPING_TRIG + BEFORE INSERT + ON SP_ROLE_MAPPING + REFERENCING NEW AS NEW + FOR EACH ROW + BEGIN + SELECT SP_ROLE_MAPPING_SEQ.nextval INTO :NEW.ID FROM dual; + END; +/ +ALTER TABLE SP_ROLE_MAPPING ADD CONSTRAINT ROLEID_APPID_CONSTRAINT FOREIGN KEY (APP_ID) REFERENCES SP_APP (ID) ON DELETE CASCADE +/ +CREATE TABLE SP_REQ_PATH_AUTHENTICATOR ( + ID INTEGER, + TENANT_ID INTEGER NOT NULL, + AUTHENTICATOR_NAME VARCHAR (255) NOT NULL , + APP_ID INTEGER NOT NULL, + PRIMARY KEY (ID)) +/ +CREATE SEQUENCE SP_REQ_PATH_AUTH_SEQ START WITH 1 INCREMENT BY 1 NOCACHE +/ +CREATE OR REPLACE TRIGGER SP_REQ_PATH_AUTH_TRIG + BEFORE INSERT + ON SP_REQ_PATH_AUTHENTICATOR + REFERENCING NEW AS NEW + FOR EACH ROW + BEGIN + SELECT SP_REQ_PATH_AUTH_SEQ.nextval INTO :NEW.ID FROM dual; + END; +/ +ALTER TABLE SP_REQ_PATH_AUTHENTICATOR ADD CONSTRAINT REQ_AUTH_APPID_CONSTRAINT FOREIGN KEY (APP_ID) REFERENCES SP_APP (ID) ON DELETE CASCADE +/ +CREATE TABLE SP_PROVISIONING_CONNECTOR ( + ID INTEGER, + TENANT_ID INTEGER NOT NULL, + IDP_NAME VARCHAR (255) NOT NULL , + CONNECTOR_NAME VARCHAR (255) NOT NULL , + APP_ID INTEGER NOT NULL, + IS_JIT_ENABLED CHAR(1) DEFAULT '0', + BLOCKING CHAR(1) DEFAULT '0', + PRIMARY KEY (ID)) +/ +CREATE SEQUENCE SP_PROV_CONNECTOR_SEQ START WITH 1 INCREMENT BY 1 NOCACHE +/ +CREATE OR REPLACE TRIGGER SP_PROV_CONNECTOR_TRIG + BEFORE INSERT + ON SP_PROVISIONING_CONNECTOR + REFERENCING NEW AS NEW + FOR EACH ROW + BEGIN + SELECT SP_PROV_CONNECTOR_SEQ.nextval INTO :NEW.ID FROM dual; + END; +/ +ALTER TABLE SP_PROVISIONING_CONNECTOR ADD CONSTRAINT PRO_CONNECTOR_APPID_CONSTRAINT FOREIGN KEY (APP_ID) REFERENCES SP_APP (ID) ON DELETE CASCADE +/ +CREATE TABLE IDP ( + ID INTEGER, + TENANT_ID INTEGER, + NAME VARCHAR(254) NOT NULL, + IS_ENABLED CHAR(1) DEFAULT '1', + IS_PRIMARY CHAR(1) DEFAULT '0', + HOME_REALM_ID VARCHAR(254), + IMAGE BLOB, + CERTIFICATE BLOB, + ALIAS VARCHAR(254), + INBOUND_PROV_ENABLED CHAR (1) DEFAULT '0', + INBOUND_PROV_USER_STORE_ID VARCHAR(254), + USER_CLAIM_URI VARCHAR(254), + ROLE_CLAIM_URI VARCHAR(254), + DESCRIPTION VARCHAR (1024), + DEFAULT_AUTHENTICATOR_NAME VARCHAR(254), + DEFAULT_PRO_CONNECTOR_NAME VARCHAR(254), + PROVISIONING_ROLE VARCHAR(128), + IS_FEDERATION_HUB CHAR(1) DEFAULT '0', + IS_LOCAL_CLAIM_DIALECT CHAR(1) DEFAULT '0', + DISPLAY_NAME VARCHAR(255), + PRIMARY KEY (ID), + UNIQUE (TENANT_ID, NAME)) +/ +CREATE SEQUENCE IDP_SEQ START WITH 1 INCREMENT BY 1 NOCACHE +/ +CREATE OR REPLACE TRIGGER IDP_TRIG + BEFORE INSERT + ON IDP + REFERENCING NEW AS NEW + FOR EACH ROW + BEGIN + SELECT IDP_SEQ.nextval INTO :NEW.ID FROM dual; + END; +/ +INSERT INTO IDP (TENANT_ID, NAME, HOME_REALM_ID) VALUES (-1234, 'LOCAL', 'localhost') +/ +CREATE TABLE IDP_ROLE ( + ID INTEGER, + IDP_ID INTEGER, + TENANT_ID INTEGER, + ROLE VARCHAR(254), + PRIMARY KEY (ID), + UNIQUE (IDP_ID, ROLE), + FOREIGN KEY (IDP_ID) REFERENCES IDP(ID) ON DELETE CASCADE) +/ +CREATE SEQUENCE IDP_ROLE_SEQ START WITH 1 INCREMENT BY 1 NOCACHE +/ +CREATE OR REPLACE TRIGGER IDP_ROLE_TRIG + BEFORE INSERT + ON IDP_ROLE + REFERENCING NEW AS NEW + FOR EACH ROW + BEGIN + SELECT IDP_ROLE_SEQ.nextval INTO :NEW.ID FROM dual; + END; +/ +CREATE TABLE IDP_ROLE_MAPPING ( + ID INTEGER, + IDP_ROLE_ID INTEGER, + TENANT_ID INTEGER, + USER_STORE_ID VARCHAR (253), + LOCAL_ROLE VARCHAR(253), + PRIMARY KEY (ID), + UNIQUE (IDP_ROLE_ID, TENANT_ID, USER_STORE_ID, LOCAL_ROLE), + FOREIGN KEY (IDP_ROLE_ID) REFERENCES IDP_ROLE(ID) ON DELETE CASCADE) +/ +CREATE SEQUENCE IDP_ROLE_MAPPING_SEQ START WITH 1 INCREMENT BY 1 NOCACHE +/ +CREATE OR REPLACE TRIGGER IDP_ROLE_MAPPING_TRIG + BEFORE INSERT + ON IDP_ROLE_MAPPING + REFERENCING NEW AS NEW + FOR EACH ROW + BEGIN + SELECT IDP_ROLE_MAPPING_SEQ.nextval INTO :NEW.ID FROM dual; + END; +/ +CREATE TABLE IDP_CLAIM ( + ID INTEGER, + IDP_ID INTEGER, + TENANT_ID INTEGER, + CLAIM VARCHAR(254), + PRIMARY KEY (ID), + UNIQUE (IDP_ID, CLAIM), + FOREIGN KEY (IDP_ID) REFERENCES IDP(ID) ON DELETE CASCADE) +/ +CREATE SEQUENCE IDP_CLAIM_SEQ START WITH 1 INCREMENT BY 1 NOCACHE +/ +CREATE OR REPLACE TRIGGER IDP_CLAIM_TRIG + BEFORE INSERT + ON IDP_CLAIM + REFERENCING NEW AS NEW + FOR EACH ROW + BEGIN + SELECT IDP_CLAIM_SEQ.nextval INTO :NEW.ID FROM dual; + END; +/ +CREATE TABLE IDP_CLAIM_MAPPING ( + ID INTEGER, + IDP_CLAIM_ID INTEGER, + TENANT_ID INTEGER, + LOCAL_CLAIM VARCHAR(253), + DEFAULT_VALUE VARCHAR(255), + IS_REQUESTED VARCHAR(128) DEFAULT '0', + PRIMARY KEY (ID), + UNIQUE (IDP_CLAIM_ID, TENANT_ID, LOCAL_CLAIM), + FOREIGN KEY (IDP_CLAIM_ID) REFERENCES IDP_CLAIM(ID) ON DELETE CASCADE) +/ +CREATE SEQUENCE IDP_CLAIM_MAPPING_SEQ START WITH 1 INCREMENT BY 1 NOCACHE +/ +CREATE OR REPLACE TRIGGER IDP_CLAIM_MAPPING_TRIG + BEFORE INSERT + ON IDP_CLAIM_MAPPING + REFERENCING NEW AS NEW + FOR EACH ROW + BEGIN + SELECT IDP_CLAIM_MAPPING_SEQ.nextval INTO :NEW.ID FROM dual; + END; +/ +CREATE TABLE IDP_AUTHENTICATOR ( + ID INTEGER, + TENANT_ID INTEGER, + IDP_ID INTEGER, + NAME VARCHAR(255) NOT NULL, + IS_ENABLED CHAR (1) DEFAULT '1', + DISPLAY_NAME VARCHAR(255), + PRIMARY KEY (ID), + UNIQUE (TENANT_ID, IDP_ID, NAME), + FOREIGN KEY (IDP_ID) REFERENCES IDP(ID) ON DELETE CASCADE) +/ +CREATE SEQUENCE IDP_AUTHENTICATOR_SEQ START WITH 1 INCREMENT BY 1 NOCACHE +/ +CREATE OR REPLACE TRIGGER IDP_AUTHENTICATOR_TRIG + BEFORE INSERT + ON IDP_AUTHENTICATOR + REFERENCING NEW AS NEW + FOR EACH ROW + BEGIN + SELECT IDP_AUTHENTICATOR_SEQ.nextval INTO :NEW.ID FROM dual; + END; +/ +INSERT INTO IDP_AUTHENTICATOR (TENANT_ID, IDP_ID, NAME) VALUES (-1234, 1, 'samlsso') +/ +INSERT INTO IDP_AUTHENTICATOR (TENANT_ID, IDP_ID, NAME) VALUES (-1234, 1, 'IDPProperties') +/ +INSERT INTO IDP_AUTHENTICATOR (TENANT_ID, IDP_ID, NAME) VALUES (-1234, 1, 'passivests') +/ + +CREATE TABLE IDP_METADATA ( + ID INTEGER, + IDP_ID INTEGER, + NAME VARCHAR(255) NOT NULL, + VALUE VARCHAR(255) NOT NULL, + DISPLAY_NAME VARCHAR(255), + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY (ID), + CONSTRAINT IDP_METADATA_CONSTRAINT UNIQUE (IDP_ID, NAME), + FOREIGN KEY (IDP_ID) REFERENCES IDP(ID) ON DELETE CASCADE) +/ +CREATE SEQUENCE IDP_METADATA_SEQ START WITH 1 INCREMENT BY 1 NOCACHE +/ +CREATE OR REPLACE TRIGGER IDP_METADATA_TRIG + BEFORE INSERT + ON IDP_METADATA + REFERENCING NEW AS NEW + FOR EACH ROW + BEGIN + SELECT IDP_METADATA_SEQ.nextval INTO :NEW.ID FROM dual; + END; +/ + +INSERT INTO IDP_METADATA (IDP_ID, NAME, VALUE, DISPLAY_NAME) VALUES (1, 'SessionIdleTimeout', '20160', 'Session Idle Timeout') +/ +INSERT INTO IDP_METADATA (IDP_ID, NAME, VALUE, DISPLAY_NAME) VALUES (1, 'RememberMeTimeout', '15', 'RememberMe Timeout') +/ + +CREATE TABLE IDP_AUTHENTICATOR_PROPERTY ( + ID INTEGER, + TENANT_ID INTEGER, + AUTHENTICATOR_ID INTEGER, + PROPERTY_KEY VARCHAR(255) NOT NULL, + PROPERTY_VALUE VARCHAR(2047), + IS_SECRET CHAR (1) DEFAULT '0', + PRIMARY KEY (ID), + UNIQUE (TENANT_ID, AUTHENTICATOR_ID, PROPERTY_KEY), + FOREIGN KEY (AUTHENTICATOR_ID) REFERENCES IDP_AUTHENTICATOR(ID) ON DELETE CASCADE) +/ +CREATE SEQUENCE IDP_AUTHENTICATOR_PROP_SEQ START WITH 1 INCREMENT BY 1 NOCACHE +/ +CREATE OR REPLACE TRIGGER IDP_AUTHENTICATOR_PROP_TRIG + BEFORE INSERT + ON IDP_AUTHENTICATOR_PROPERTY + REFERENCING NEW AS NEW + FOR EACH ROW + BEGIN + SELECT IDP_AUTHENTICATOR_PROP_SEQ.nextval INTO :NEW.ID FROM dual; + END; +/ +INSERT INTO IDP_AUTHENTICATOR_PROPERTY (TENANT_ID, AUTHENTICATOR_ID, PROPERTY_KEY,PROPERTY_VALUE, IS_SECRET ) VALUES (-1234, 1 , 'IdPEntityId', 'localhost', '0') +/ +INSERT INTO IDP_AUTHENTICATOR_PROPERTY (TENANT_ID, AUTHENTICATOR_ID, PROPERTY_KEY,PROPERTY_VALUE, IS_SECRET ) VALUES (-1234, 3 , 'IdPEntityId', 'localhost', '0') +/ + +CREATE TABLE IDP_PROVISIONING_CONFIG ( + ID INTEGER, + TENANT_ID INTEGER, + IDP_ID INTEGER, + PROVISIONING_CONNECTOR_TYPE VARCHAR(255) NOT NULL, + IS_ENABLED CHAR (1) DEFAULT '0', + IS_BLOCKING CHAR (1) DEFAULT '0', + PRIMARY KEY (ID), + UNIQUE (TENANT_ID, IDP_ID, PROVISIONING_CONNECTOR_TYPE), + FOREIGN KEY (IDP_ID) REFERENCES IDP(ID) ON DELETE CASCADE) +/ +CREATE SEQUENCE IDP_PROVISIONING_CONFIG_SEQ START WITH 1 INCREMENT BY 1 NOCACHE +/ +CREATE OR REPLACE TRIGGER IDP_PROVISIONING_CONFIG_TRIG + BEFORE INSERT + ON IDP_PROVISIONING_CONFIG + REFERENCING NEW AS NEW + FOR EACH ROW + BEGIN + SELECT IDP_PROVISIONING_CONFIG_SEQ.nextval INTO :NEW.ID FROM dual; + END; +/ +CREATE TABLE IDP_PROV_CONFIG_PROPERTY ( + ID INTEGER, + TENANT_ID INTEGER, + PROVISIONING_CONFIG_ID INTEGER, + PROPERTY_KEY VARCHAR(255) NOT NULL, + PROPERTY_VALUE VARCHAR(2048), + PROPERTY_BLOB_VALUE BLOB, + PROPERTY_TYPE CHAR(32) NOT NULL, + IS_SECRET CHAR (1) DEFAULT '0', + PRIMARY KEY (ID), + UNIQUE (TENANT_ID, PROVISIONING_CONFIG_ID, PROPERTY_KEY), + FOREIGN KEY (PROVISIONING_CONFIG_ID) REFERENCES IDP_PROVISIONING_CONFIG(ID) ON DELETE CASCADE) +/ +CREATE SEQUENCE IDP_PROV_CONFIG_PROP_SEQ START WITH 1 INCREMENT BY 1 NOCACHE +/ +CREATE OR REPLACE TRIGGER IDP_PROV_CONFIG_PROP_TRIG + BEFORE INSERT + ON IDP_PROV_CONFIG_PROPERTY + REFERENCING NEW AS NEW + FOR EACH ROW + BEGIN + SELECT IDP_PROV_CONFIG_PROP_SEQ.nextval INTO :NEW.ID FROM dual; + END; +/ +CREATE TABLE IDP_PROVISIONING_ENTITY ( + ID INTEGER, + PROVISIONING_CONFIG_ID INTEGER, + ENTITY_TYPE VARCHAR(255) NOT NULL, + ENTITY_LOCAL_USERSTORE VARCHAR(255) NOT NULL, + ENTITY_NAME VARCHAR(255) NOT NULL, + ENTITY_VALUE VARCHAR(255), + TENANT_ID INTEGER, + ENTITY_LOCAL_ID VARCHAR(255), + PRIMARY KEY (ID), + UNIQUE (ENTITY_TYPE, TENANT_ID, ENTITY_LOCAL_USERSTORE, ENTITY_NAME, PROVISIONING_CONFIG_ID), + UNIQUE (PROVISIONING_CONFIG_ID, ENTITY_TYPE, ENTITY_VALUE), + FOREIGN KEY (PROVISIONING_CONFIG_ID) REFERENCES IDP_PROVISIONING_CONFIG(ID) ON DELETE CASCADE) +/ +CREATE SEQUENCE IDP_PROV_ENTITY_SEQ START WITH 1 INCREMENT BY 1 NOCACHE +/ +CREATE OR REPLACE TRIGGER IDP_PROV_ENTITY_TRIG + BEFORE INSERT + ON IDP_PROVISIONING_ENTITY + REFERENCING NEW AS NEW + FOR EACH ROW + BEGIN + SELECT IDP_PROV_ENTITY_SEQ.nextval INTO :NEW.ID FROM dual; + END; +/ +CREATE TABLE IDP_LOCAL_CLAIM ( + ID INTEGER, + TENANT_ID INTEGER, + IDP_ID INTEGER, + CLAIM_URI VARCHAR(255) NOT NULL, + DEFAULT_VALUE VARCHAR(255), + IS_REQUESTED VARCHAR(128) DEFAULT '0', + PRIMARY KEY (ID), + UNIQUE (TENANT_ID, IDP_ID, CLAIM_URI), + FOREIGN KEY (IDP_ID) REFERENCES IDP(ID) ON DELETE CASCADE) +/ +CREATE SEQUENCE IDP_LOCAL_CLAIM_SEQ START WITH 1 INCREMENT BY 1 NOCACHE +/ +CREATE OR REPLACE TRIGGER IDP_LOCAL_CLAIM_TRIG + BEFORE INSERT + ON IDP_LOCAL_CLAIM + REFERENCING NEW AS NEW + FOR EACH ROW + BEGIN + SELECT IDP_LOCAL_CLAIM_SEQ.nextval INTO :NEW.ID FROM dual; + END; +/ +CREATE TABLE IDN_ASSOCIATED_ID ( + ID INTEGER, + IDP_USER_ID VARCHAR(255) NOT NULL, + TENANT_ID INTEGER DEFAULT -1234, + IDP_ID INTEGER NOT NULL, + DOMAIN_NAME VARCHAR(255) NOT NULL, + USER_NAME VARCHAR(255) NOT NULL, + PRIMARY KEY (ID), + UNIQUE(IDP_USER_ID, TENANT_ID, IDP_ID), + FOREIGN KEY (IDP_ID) REFERENCES IDP(ID) ON DELETE CASCADE +) +/ +CREATE SEQUENCE IDN_ASSOCIATED_ID_SEQ START WITH 1 INCREMENT BY 1 NOCACHE +/ +CREATE OR REPLACE TRIGGER IDN_ASSOCIATED_ID_TRIG +BEFORE INSERT +ON IDN_ASSOCIATED_ID +REFERENCING NEW AS NEW +FOR EACH ROW + BEGIN + SELECT IDN_ASSOCIATED_ID_SEQ.nextval + INTO :NEW.ID + FROM dual; + END; +/ +CREATE TABLE IDN_USER_ACCOUNT_ASSOCIATION ( + ASSOCIATION_KEY VARCHAR(255) NOT NULL, + TENANT_ID INTEGER, + DOMAIN_NAME VARCHAR(255) NOT NULL, + USER_NAME VARCHAR(255) NOT NULL, + PRIMARY KEY (TENANT_ID, DOMAIN_NAME, USER_NAME)) +/ +CREATE TABLE FIDO_DEVICE_STORE ( + TENANT_ID INTEGER, + DOMAIN_NAME VARCHAR(255) NOT NULL, + USER_NAME VARCHAR(45) NOT NULL, + TIME_REGISTERED TIMESTAMP, + KEY_HANDLE VARCHAR(200) NOT NULL, + DEVICE_DATA VARCHAR(2048) NOT NULL, + PRIMARY KEY (TENANT_ID, DOMAIN_NAME, USER_NAME, KEY_HANDLE)) +/ + +CREATE TABLE WF_REQUEST ( + UUID VARCHAR2 (45), + CREATED_BY VARCHAR2 (255), + TENANT_ID INTEGER DEFAULT -1, + OPERATION_TYPE VARCHAR2 (50), + CREATED_AT TIMESTAMP, + UPDATED_AT TIMESTAMP, + STATUS VARCHAR2 (30), + REQUEST BLOB, + PRIMARY KEY (UUID)) +/ + +CREATE TABLE WF_BPS_PROFILE ( + PROFILE_NAME VARCHAR2(45), + HOST_URL_MANAGER VARCHAR2(45), + HOST_URL_WORKER VARCHAR2(45), + USERNAME VARCHAR2(45), + PASSWORD VARCHAR2(255), + CALLBACK_HOST VARCHAR2 (45), + CALLBACK_USERNAME VARCHAR2 (45), + CALLBACK_PASSWORD VARCHAR2 (255), + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY (PROFILE_NAME, TENANT_ID)) +/ + +CREATE TABLE WF_WORKFLOW( + ID VARCHAR2 (45), + WF_NAME VARCHAR2 (45), + DESCRIPTION VARCHAR2 (255), + TEMPLATE_ID VARCHAR2 (45), + IMPL_ID VARCHAR2 (45), + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY (ID)) +/ + +CREATE TABLE WF_WORKFLOW_ASSOCIATION( + ID INTEGER, + ASSOC_NAME VARCHAR2 (45), + EVENT_ID VARCHAR2(45), + ASSOC_CONDITION VARCHAR2 (2000), + WORKFLOW_ID VARCHAR2 (45), + IS_ENABLED CHAR (1) DEFAULT '1', + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY(ID), + FOREIGN KEY (WORKFLOW_ID) REFERENCES WF_WORKFLOW(ID)ON DELETE CASCADE) +/ + +CREATE SEQUENCE WF_WORKFLOW_ASSOCIATION_SEQ START WITH 1 INCREMENT BY 1 NOCACHE +/ +CREATE OR REPLACE TRIGGER WF_WORKFLOW_ASSOCIATION_TRIG +BEFORE INSERT +ON WF_WORKFLOW_ASSOCIATION +REFERENCING NEW AS NEW +FOR EACH ROW + BEGIN + SELECT WF_WORKFLOW_ASSOCIATION_SEQ.nextval + INTO :NEW.ID + FROM dual; + END; +/ + +CREATE TABLE WF_WORKFLOW_CONFIG_PARAM( + WORKFLOW_ID VARCHAR2 (45), + PARAM_NAME VARCHAR2 (45), + PARAM_VALUE VARCHAR2 (1000), + PARAM_QNAME VARCHAR2 (45), + PARAM_HOLDER VARCHAR2 (45), + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY (WORKFLOW_ID, PARAM_NAME, PARAM_QNAME, PARAM_HOLDER), + FOREIGN KEY (WORKFLOW_ID) REFERENCES WF_WORKFLOW(ID)ON DELETE CASCADE) +/ + +CREATE TABLE WF_REQUEST_ENTITY_RELATIONSHIP( + REQUEST_ID VARCHAR2 (45), + ENTITY_NAME VARCHAR2 (255), + ENTITY_TYPE VARCHAR2 (50), + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY(REQUEST_ID, ENTITY_NAME, ENTITY_TYPE, TENANT_ID), + FOREIGN KEY (REQUEST_ID) REFERENCES WF_REQUEST(UUID)ON DELETE CASCADE) +/ + +CREATE TABLE WF_WORKFLOW_REQUEST_RELATION( + RELATIONSHIP_ID VARCHAR2 (45), + WORKFLOW_ID VARCHAR2 (45), + REQUEST_ID VARCHAR2 (45), + UPDATED_AT TIMESTAMP, + STATUS VARCHAR (30), + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY (RELATIONSHIP_ID), + FOREIGN KEY (WORKFLOW_ID) REFERENCES WF_WORKFLOW(ID)ON DELETE CASCADE, + FOREIGN KEY (REQUEST_ID) REFERENCES WF_REQUEST(UUID)ON DELETE CASCADE) +/ +-- End of IDENTITY Tables-- + +-- Start of API-MGT Tables-- +CREATE TABLE AM_SUBSCRIBER ( + SUBSCRIBER_ID INTEGER, + USER_ID VARCHAR2(50) NOT NULL, + TENANT_ID INTEGER NOT NULL, + EMAIL_ADDRESS VARCHAR2(256) NULL, + DATE_SUBSCRIBED DATE NOT NULL, + CREATED_BY VARCHAR2(100), + CREATED_TIME DATE, + UPDATED_BY VARCHAR2(100), + UPDATED_TIME DATE, + PRIMARY KEY (SUBSCRIBER_ID), + UNIQUE (TENANT_ID,USER_ID) +) +/ + +CREATE SEQUENCE AM_SUBSCRIBER_SEQUENCE START WITH 1 INCREMENT BY 1 +/ + +CREATE OR REPLACE TRIGGER AM_SUBSCRIBER_TRIGGER + BEFORE INSERT + ON AM_SUBSCRIBER + REFERENCING NEW AS NEW + FOR EACH ROW + BEGIN + SELECT AM_SUBSCRIBER_SEQUENCE.nextval INTO :NEW.SUBSCRIBER_ID FROM dual; + END; +/ +-- TODO: Have to add ON UPDATE CASCADE for the FOREIGN KEY(SUBSCRIBER_ID) relation +CREATE TABLE AM_APPLICATION ( + APPLICATION_ID INTEGER, + NAME VARCHAR2(100), + SUBSCRIBER_ID INTEGER, + APPLICATION_TIER VARCHAR2(50) DEFAULT 'Unlimited', + CALLBACK_URL VARCHAR2(512), + DESCRIPTION VARCHAR2(512), + APPLICATION_STATUS VARCHAR2(50) DEFAULT 'APPROVED', + CREATED_BY VARCHAR2(100), + CREATED_TIME DATE, + UPDATED_BY VARCHAR2(100), + UPDATED_TIME DATE, + FOREIGN KEY(SUBSCRIBER_ID) REFERENCES AM_SUBSCRIBER(SUBSCRIBER_ID) ON DELETE CASCADE, + PRIMARY KEY(APPLICATION_ID), + UNIQUE (NAME,SUBSCRIBER_ID) +) +/ + +CREATE SEQUENCE AM_APPLICATION_SEQUENCE START WITH 1 INCREMENT BY 1 +/ + +CREATE OR REPLACE TRIGGER AM_APPLICATION_TRIGGER + BEFORE INSERT + ON AM_APPLICATION + REFERENCING NEW AS NEW + FOR EACH ROW + BEGIN + SELECT AM_APPLICATION_SEQUENCE.nextval INTO :NEW.APPLICATION_ID FROM dual; + END; +/ + +CREATE TABLE AM_API ( + API_ID INTEGER, + API_PROVIDER VARCHAR2(256), + API_NAME VARCHAR2(256), + API_VERSION VARCHAR2(30), + CONTEXT VARCHAR2(256), + CONTEXT_TEMPLATE VARCHAR2(256), + CREATED_BY VARCHAR2(100), + CREATED_TIME DATE, + UPDATED_BY VARCHAR2(100), + UPDATED_TIME DATE, + PRIMARY KEY(API_ID), + UNIQUE (API_PROVIDER,API_NAME,API_VERSION) +) +/ + +CREATE SEQUENCE AM_API_SEQUENCE START WITH 1 INCREMENT BY 1 +/ + +CREATE OR REPLACE TRIGGER AM_API_TRIGGER + BEFORE INSERT + ON AM_API + REFERENCING NEW AS NEW + FOR EACH ROW + BEGIN + SELECT AM_API_SEQUENCE.nextval INTO :NEW.API_ID FROM dual; + END; +/ + +CREATE TABLE AM_API_URL_MAPPING ( + URL_MAPPING_ID INTEGER, + API_ID INTEGER NOT NULL, + HTTP_METHOD VARCHAR(20) NULL, + AUTH_SCHEME VARCHAR(50) NULL, + URL_PATTERN VARCHAR(512) NULL, + THROTTLING_TIER varchar(512) DEFAULT NULL, + MEDIATION_SCRIPT BLOB, + PRIMARY KEY(URL_MAPPING_ID) +) +/ + +CREATE SEQUENCE AM_API_URL_MAPPING_SEQUENCE START WITH 1 INCREMENT BY 1 +/ + +CREATE OR REPLACE TRIGGER AM_API_URL_MAPPING_TRIGGER + BEFORE INSERT + ON AM_API_URL_MAPPING + REFERENCING NEW AS NEW + FOR EACH ROW + BEGIN + SELECT AM_API_URL_MAPPING_SEQUENCE.nextval INTO :NEW.URL_MAPPING_ID FROM dual; + END; +/ + +-- TODO: Have to add ON UPDATE CASCADE for the FOREIGN KEY(SUBSCRIPTION_ID) relation +CREATE TABLE AM_SUBSCRIPTION ( + SUBSCRIPTION_ID INTEGER, + TIER_ID VARCHAR2(50), + API_ID INTEGER, + LAST_ACCESSED DATE NULL, + APPLICATION_ID INTEGER, + SUB_STATUS VARCHAR(50), + SUBS_CREATE_STATE VARCHAR(50) DEFAULT 'SUBSCRIBE', + CREATED_BY VARCHAR2(100), + CREATED_TIME DATE, + UPDATED_BY VARCHAR2(100), + UPDATED_TIME DATE, + FOREIGN KEY(APPLICATION_ID) REFERENCES AM_APPLICATION(APPLICATION_ID) ON DELETE CASCADE, + FOREIGN KEY(API_ID) REFERENCES AM_API(API_ID) ON DELETE CASCADE, + PRIMARY KEY (SUBSCRIPTION_ID) +) +/ + +CREATE SEQUENCE AM_SUBSCRIPTION_SEQUENCE START WITH 1 INCREMENT BY 1 +/ + +CREATE OR REPLACE TRIGGER AM_SUBSCRIPTION_TRIGGER + BEFORE INSERT + ON AM_SUBSCRIPTION + REFERENCING NEW AS NEW + FOR EACH ROW + BEGIN + SELECT AM_SUBSCRIPTION_SEQUENCE.nextval INTO :NEW.SUBSCRIPTION_ID FROM dual; + END; +/ +-- TODO: Have to add ON UPDATE CASCADE for the FOREIGN KEY(APPLICATION_ID) and FOREIGN KEY(API_ID) relations +CREATE TABLE AM_SUBSCRIPTION_KEY_MAPPING ( + SUBSCRIPTION_ID INTEGER, + ACCESS_TOKEN VARCHAR2(512), + KEY_TYPE VARCHAR2(512) NOT NULL, + FOREIGN KEY(SUBSCRIPTION_ID) REFERENCES AM_SUBSCRIPTION(SUBSCRIPTION_ID) ON DELETE CASCADE, + PRIMARY KEY(SUBSCRIPTION_ID,ACCESS_TOKEN) +) +/ +--TODO: Have to add ON UPDATE CASCADE for the FOREIGN KEY(APPLICATION_ID) relation +CREATE TABLE AM_APPLICATION_KEY_MAPPING ( + APPLICATION_ID INTEGER, + CONSUMER_KEY VARCHAR2(512), + KEY_TYPE VARCHAR2(512) NOT NULL, + STATE VARCHAR2(30) NOT NULL, + FOREIGN KEY(APPLICATION_ID) REFERENCES AM_APPLICATION(APPLICATION_ID) ON DELETE CASCADE, + PRIMARY KEY(APPLICATION_ID,KEY_TYPE) +) +/ + +CREATE TABLE AM_APPLICATION_REGISTRATION ( + REG_ID INTEGER , + SUBSCRIBER_ID INTEGER, + WF_REF VARCHAR2(255) NOT NULL, + APP_ID INTEGER, + TOKEN_TYPE VARCHAR2(30), + TOKEN_SCOPE VARCHAR2(256) DEFAULT 'default', + ALLOWED_DOMAINS VARCHAR2(256), + VALIDITY_PERIOD NUMBER(19), + UNIQUE (SUBSCRIBER_ID,APP_ID,TOKEN_TYPE), + FOREIGN KEY(SUBSCRIBER_ID) REFERENCES AM_SUBSCRIBER(SUBSCRIBER_ID), + FOREIGN KEY(APP_ID) REFERENCES AM_APPLICATION(APPLICATION_ID), + PRIMARY KEY (REG_ID) +) +/ +-- TODO: Have to add ON UPDATE CASCADE for the FOREIGN KEY(API_ID) relation +CREATE TABLE AM_API_LC_EVENT ( + EVENT_ID INTEGER, + API_ID INTEGER NOT NULL, + PREVIOUS_STATE VARCHAR2(50), + NEW_STATE VARCHAR2(50) NOT NULL, + USER_ID VARCHAR2(50) NOT NULL, + TENANT_ID INTEGER NOT NULL, + EVENT_DATE DATE NOT NULL, + FOREIGN KEY(API_ID) REFERENCES AM_API(API_ID) ON DELETE CASCADE, + PRIMARY KEY (EVENT_ID) +) +/ + +CREATE TABLE AM_APP_KEY_DOMAIN_MAPPING ( + CONSUMER_KEY VARCHAR(255), + AUTHZ_DOMAIN VARCHAR(255) DEFAULT 'ALL', + PRIMARY KEY (CONSUMER_KEY,AUTHZ_DOMAIN) + +) +/ + +CREATE TABLE AM_API_COMMENTS ( + COMMENT_ID INTEGER, + COMMENT_TEXT VARCHAR2(512), + COMMENTED_USER VARCHAR2(255), + DATE_COMMENTED DATE NOT NULL, + API_ID INTEGER NOT NULL, + FOREIGN KEY(API_ID) REFERENCES AM_API(API_ID) ON DELETE CASCADE, + PRIMARY KEY (COMMENT_ID) +) +/ + +CREATE SEQUENCE AM_API_COMMENTS_SEQUENCE START WITH 1 INCREMENT BY 1 +/ + +CREATE OR REPLACE TRIGGER AM_API_COMMENTS_TRIGGER + BEFORE INSERT + ON AM_API_COMMENTS + REFERENCING NEW AS NEW + FOR EACH ROW + BEGIN + SELECT AM_API_COMMENTS_SEQUENCE.nextval INTO :NEW.COMMENT_ID FROM dual; + END; +/ + +CREATE TABLE AM_API_RATINGS ( + RATING_ID INTEGER, + API_ID INTEGER, + RATING INTEGER, + SUBSCRIBER_ID INTEGER, + FOREIGN KEY(API_ID) REFERENCES AM_API(API_ID) ON DELETE CASCADE, + FOREIGN KEY(SUBSCRIBER_ID) REFERENCES AM_SUBSCRIBER(SUBSCRIBER_ID) ON DELETE CASCADE, + PRIMARY KEY (RATING_ID) +) +/ + +CREATE SEQUENCE AM_API_RATINGS_SEQUENCE START WITH 1 INCREMENT BY 1 +/ + +CREATE OR REPLACE TRIGGER AM_API_RATINGS_TRIGGER + BEFORE INSERT + ON AM_API_RATINGS + REFERENCING NEW AS NEW + FOR EACH ROW + BEGIN + SELECT AM_API_RATINGS_SEQUENCE.nextval INTO :NEW.RATING_ID FROM dual; + END; +/ + +CREATE TABLE AM_TIER_PERMISSIONS ( + TIER_PERMISSIONS_ID INTEGER, + TIER VARCHAR2(50) NOT NULL, + PERMISSIONS_TYPE VARCHAR2(50) NOT NULL, + ROLES VARCHAR2(512) NOT NULL, + TENANT_ID INTEGER NOT NULL, + PRIMARY KEY(TIER_PERMISSIONS_ID) +) +/ + +CREATE SEQUENCE AM_TIER_PERMISSIONS_SEQUENCE START WITH 1 INCREMENT BY 1 +/ + +CREATE OR REPLACE TRIGGER AM_TIER_PERMISSIONS_TRIGGER + BEFORE INSERT + ON AM_TIER_PERMISSIONS + REFERENCING NEW AS NEW + FOR EACH ROW + BEGIN + SELECT AM_TIER_PERMISSIONS_SEQUENCE.nextval INTO :NEW.TIER_PERMISSIONS_ID FROM dual; + END; +/ + +CREATE SEQUENCE AM_API_LC_EVENT_SEQUENCE START WITH 1 INCREMENT BY 1 +/ + +CREATE OR REPLACE TRIGGER AM_API_LC_EVENT_TRIGGER + BEFORE INSERT + ON AM_API_LC_EVENT + REFERENCING NEW AS NEW + FOR EACH ROW + BEGIN + SELECT AM_API_LC_EVENT_SEQUENCE.nextval INTO :NEW.EVENT_ID FROM dual; + END; +/ +-- Start of IDP-APPLICATION-MGT Tables -- + +-- End of IDP-APPLICATION-MGT Tables -- + + +CREATE TABLE AM_EXTERNAL_STORES ( + APISTORE_ID INTEGER, + API_ID INTEGER, + STORE_ID VARCHAR2(255) NOT NULL, + STORE_DISPLAY_NAME VARCHAR2(255) NOT NULL, + STORE_ENDPOINT VARCHAR2(255) NOT NULL, + STORE_TYPE VARCHAR2(255) NOT NULL, + FOREIGN KEY(API_ID) REFERENCES AM_API(API_ID) ON DELETE CASCADE, + PRIMARY KEY (APISTORE_ID) +) +/ + +CREATE TABLE AM_WORKFLOWS( + WF_ID INTEGER, + WF_REFERENCE VARCHAR(255) NOT NULL, + WF_TYPE VARCHAR(255) NOT NULL, + WF_STATUS VARCHAR(255) NOT NULL, + WF_CREATED_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + WF_UPDATED_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + WF_STATUS_DESC VARCHAR(1000), + TENANT_ID INTEGER, + TENANT_DOMAIN VARCHAR(255), + WF_EXTERNAL_REFERENCE VARCHAR(255) NOT NULL UNIQUE, + PRIMARY KEY (WF_ID) +) +/ + +CREATE TABLE AM_API_SCOPES ( + API_ID INTEGER NOT NULL, + SCOPE_ID INTEGER NOT NULL, + FOREIGN KEY (API_ID) REFERENCES AM_API (API_ID) ON DELETE CASCADE, + FOREIGN KEY (SCOPE_ID) REFERENCES IDN_OAUTH2_SCOPE (SCOPE_ID) ON DELETE CASCADE +) +/ +CREATE SEQUENCE AM_APP_REGISTRATION_SEQUENCE START WITH 1 INCREMENT BY 1 +/ + +CREATE OR REPLACE TRIGGER AM_APP_REGISTRATION_TRIGGER + BEFORE INSERT + ON AM_APPLICATION_REGISTRATION + REFERENCING NEW AS NEW + FOR EACH ROW + BEGIN + SELECT AM_APP_REGISTRATION_SEQUENCE.nextval INTO :NEW.REG_ID FROM dual; + END; +/ + +CREATE SEQUENCE AM_WORKFLOWS_SEQUENCE START WITH 1 INCREMENT BY 1 +/ + +CREATE OR REPLACE TRIGGER AM_WORKFLOWS_TRIGGER + BEFORE INSERT + ON AM_WORKFLOWS + REFERENCING NEW AS NEW + FOR EACH ROW + BEGIN + SELECT AM_WORKFLOWS_SEQUENCE.nextval INTO :NEW.WF_ID FROM dual; + END; +/ + +CREATE SEQUENCE AM_EXTERNAL_STORES_SEQUENCE START WITH 1 INCREMENT BY 1 +/ + +CREATE OR REPLACE TRIGGER AM_EXTERNAL_STORES_TRIGGER + BEFORE INSERT + ON AM_EXTERNAL_STORES + REFERENCING NEW AS NEW + FOR EACH ROW + BEGIN + SELECT AM_EXTERNAL_STORES_SEQUENCE.nextval INTO :NEW.APISTORE_ID FROM dual; + END; +/ + +CREATE TABLE AM_API_DEFAULT_VERSION ( + DEFAULT_VERSION_ID NUMBER, + API_NAME VARCHAR(256) NOT NULL , + API_PROVIDER VARCHAR(256) NOT NULL , + DEFAULT_API_VERSION VARCHAR(30) , + PUBLISHED_DEFAULT_API_VERSION VARCHAR(30) , + PRIMARY KEY (DEFAULT_VERSION_ID) +) +/ +CREATE SEQUENCE AM_API_DEFAULT_VERSION_SEQ START WITH 1 INCREMENT BY 1 NOCACHE +/ +CREATE OR REPLACE TRIGGER AM_API_DEFAULT_VERSION_TRG + BEFORE INSERT + ON AM_API_DEFAULT_VERSION + REFERENCING NEW AS NEW + FOR EACH ROW + BEGIN + SELECT AM_API_DEFAULT_VERSION_SEQ.nextval INTO :NEW.DEFAULT_VERSION_ID FROM dual; + END; +/ +CREATE INDEX IDX_SUB_APP_ID ON AM_SUBSCRIPTION (APPLICATION_ID, SUBSCRIPTION_ID) +/ + diff --git a/modules/distribution/src/repository/resources/dbscripts/apimgt/oracle_rac.sql b/modules/distribution/src/repository/resources/dbscripts/apimgt/oracle_rac.sql new file mode 100644 index 00000000..77282503 --- /dev/null +++ b/modules/distribution/src/repository/resources/dbscripts/apimgt/oracle_rac.sql @@ -0,0 +1,1253 @@ +-- Create Oracle New User and Connect +-------------------------------------- +-- CREATE USER apimuser IDENTIFIED BY wso2; +-- GRANT CONNECT,RESOURCE to apimuser WITH ADMIN OPTION; +-- CONNECT apimuser/wso2 +-- + +-- Start of IDN Tables -- +CREATE TABLE IDN_BASE_TABLE ( + PRODUCT_NAME VARCHAR2 (20), + PRIMARY KEY (PRODUCT_NAME)) +/ +INSERT INTO IDN_BASE_TABLE values ('WSO2 Identity Server') +/ +CREATE TABLE IDN_OAUTH_CONSUMER_APPS ( + ID INTEGER, + CONSUMER_KEY VARCHAR2 (255), + CONSUMER_SECRET VARCHAR2 (512), + USERNAME VARCHAR2 (255), + TENANT_ID INTEGER DEFAULT 0, + USER_DOMAIN VARCHAR(50), + APP_NAME VARCHAR2 (255), + OAUTH_VERSION VARCHAR2 (128), + CALLBACK_URL VARCHAR2 (1024), + GRANT_TYPES VARCHAR (1024), + CONSTRAINT CONSUMER_KEY_CONSTRAINT UNIQUE (CONSUMER_KEY), + PRIMARY KEY (ID)) +/ +CREATE SEQUENCE IDN_OAUTH_CONSUMER_APPS_SEQ START WITH 1 INCREMENT BY 1 CACHE 20 ORDER +/ +CREATE OR REPLACE TRIGGER IDN_OAUTH_CONSUMER_APPS_TRIG + BEFORE INSERT + ON IDN_OAUTH_CONSUMER_APPS + REFERENCING NEW AS NEW + FOR EACH ROW + BEGIN + SELECT IDN_OAUTH_CONSUMER_APPS_SEQ.nextval INTO :NEW.ID FROM dual; + END; +/ +CREATE TABLE IDN_OAUTH1A_REQUEST_TOKEN ( + REQUEST_TOKEN VARCHAR2 (512), + REQUEST_TOKEN_SECRET VARCHAR2 (512), + CONSUMER_KEY_ID INTEGER, + CALLBACK_URL VARCHAR2 (1024), + SCOPE VARCHAR2(2048), + AUTHORIZED VARCHAR2 (128), + OAUTH_VERIFIER VARCHAR2 (512), + AUTHZ_USER VARCHAR2 (512), + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY (REQUEST_TOKEN), + FOREIGN KEY (CONSUMER_KEY_ID) REFERENCES IDN_OAUTH_CONSUMER_APPS(ID) ON DELETE CASCADE) +/ +CREATE TABLE IDN_OAUTH1A_ACCESS_TOKEN ( + ACCESS_TOKEN VARCHAR2 (512), + ACCESS_TOKEN_SECRET VARCHAR2 (512), + CONSUMER_KEY_ID INTEGER, + SCOPE VARCHAR2(2048), + AUTHZ_USER VARCHAR2 (512), + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY (ACCESS_TOKEN), + FOREIGN KEY (CONSUMER_KEY_ID) REFERENCES IDN_OAUTH_CONSUMER_APPS(ID) ON DELETE CASCADE) +/ +CREATE TABLE IDN_OAUTH2_ACCESS_TOKEN ( + TOKEN_ID VARCHAR (255), + ACCESS_TOKEN VARCHAR2 (255), + REFRESH_TOKEN VARCHAR2 (255), + CONSUMER_KEY_ID INTEGER, + AUTHZ_USER VARCHAR2 (100), + TENANT_ID INTEGER, + USER_DOMAIN VARCHAR2 (50), + USER_TYPE VARCHAR (25), + GRANT_TYPE VARCHAR (50), + TIME_CREATED TIMESTAMP, + REFRESH_TOKEN_TIME_CREATED TIMESTAMP, + VALIDITY_PERIOD NUMBER(19), + REFRESH_TOKEN_VALIDITY_PERIOD NUMBER(19), + TOKEN_SCOPE_HASH VARCHAR2 (32), + TOKEN_STATE VARCHAR2 (25) DEFAULT 'ACTIVE', + TOKEN_STATE_ID VARCHAR (128) DEFAULT 'NONE', + PRIMARY KEY (TOKEN_ID), + FOREIGN KEY (CONSUMER_KEY_ID) REFERENCES IDN_OAUTH_CONSUMER_APPS(ID) ON DELETE CASCADE, + CONSTRAINT CON_APP_KEY UNIQUE (CONSUMER_KEY_ID,AUTHZ_USER,TOKEN_ID,USER_DOMAIN,USER_TYPE,TOKEN_SCOPE_HASH, + TOKEN_STATE,TOKEN_STATE_ID)) +/ +CREATE INDEX IDX_AT_CK_AU ON IDN_OAUTH2_ACCESS_TOKEN(CONSUMER_KEY_ID, AUTHZ_USER, TOKEN_STATE, USER_TYPE) +/ +CREATE INDEX IDX_TC ON IDN_OAUTH2_ACCESS_TOKEN(TIME_CREATED) +/ +CREATE TABLE IDN_OAUTH2_AUTHORIZATION_CODE ( + AUTHORIZATION_CODE VARCHAR2 (512), + CONSUMER_KEY_ID INTEGER, + CALLBACK_URL VARCHAR2 (1024), + SCOPE VARCHAR2(2048), + AUTHZ_USER VARCHAR2 (100), + TENANT_ID INTEGER, + USER_DOMAIN VARCHAR2(50), + TIME_CREATED TIMESTAMP, + VALIDITY_PERIOD NUMBER(19), + STATE VARCHAR (25) DEFAULT 'ACTIVE', + TOKEN_ID VARCHAR(255), + PRIMARY KEY (AUTHORIZATION_CODE), + FOREIGN KEY (CONSUMER_KEY_ID) REFERENCES IDN_OAUTH_CONSUMER_APPS(ID) ON DELETE CASCADE) +/ +CREATE TABLE IDN_OAUTH2_ACCESS_TOKEN_SCOPE ( + TOKEN_ID VARCHAR2 (255), + TOKEN_SCOPE VARCHAR2 (60), + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY (TOKEN_ID, TOKEN_SCOPE), + FOREIGN KEY (TOKEN_ID) REFERENCES IDN_OAUTH2_ACCESS_TOKEN(TOKEN_ID) ON DELETE CASCADE) +/ +CREATE TABLE IDN_OAUTH2_SCOPE ( + SCOPE_ID INTEGER, + SCOPE_KEY VARCHAR2 (100) NOT NULL, + NAME VARCHAR2 (255) NULL, + DESCRIPTION VARCHAR2 (512) NULL, + TENANT_ID INTEGER DEFAULT 0, + ROLES VARCHAR2 (500) NULL, + PRIMARY KEY (SCOPE_ID)) +/ +CREATE SEQUENCE IDN_OAUTH2_SCOPE_SEQUENCE START WITH 1 INCREMENT BY 1 CACHE 20 ORDER +/ +CREATE OR REPLACE TRIGGER IDN_OAUTH2_SCOPE_TRIGGER + BEFORE INSERT + ON IDN_OAUTH2_SCOPE + REFERENCING NEW AS NEW + FOR EACH ROW + BEGIN + SELECT IDN_OAUTH2_SCOPE_SEQUENCE.nextval INTO :NEW.SCOPE_ID FROM dual; + END; +/ +CREATE TABLE IDN_OAUTH2_RESOURCE_SCOPE ( + RESOURCE_PATH VARCHAR2 (255) NOT NULL, + SCOPE_ID INTEGER NOT NULL, + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY (RESOURCE_PATH), + FOREIGN KEY (SCOPE_ID) REFERENCES IDN_OAUTH2_SCOPE (SCOPE_ID)) +/ +CREATE TABLE IDN_SCIM_GROUP ( + ID INTEGER, + TENANT_ID INTEGER NOT NULL, + ROLE_NAME VARCHAR2(255) NOT NULL, + ATTR_NAME VARCHAR2(1024) NOT NULL, + ATTR_VALUE VARCHAR2(1024), + PRIMARY KEY (ID)) +/ +CREATE SEQUENCE IDN_SCIM_GROUP_SEQUENCE START WITH 1 INCREMENT BY 1 CACHE 20 ORDER +/ + +CREATE OR REPLACE TRIGGER IDN_SCIM_GROUP_TRIGGER + BEFORE INSERT + ON IDN_SCIM_GROUP + REFERENCING NEW AS NEW + FOR EACH ROW + BEGIN + SELECT IDN_SCIM_GROUP_SEQUENCE.nextval INTO :NEW.ID FROM dual; + END; +/ +CREATE TABLE IDN_OPENID_REMEMBER_ME ( + USER_NAME VARCHAR(255) NOT NULL, + TENANT_ID INTEGER DEFAULT 0, + COOKIE_VALUE VARCHAR(1024), + CREATED_TIME TIMESTAMP, + PRIMARY KEY (USER_NAME, TENANT_ID)) +/ +CREATE TABLE IDN_OPENID_USER_RPS ( + USER_NAME VARCHAR(255) NOT NULL, + TENANT_ID INTEGER DEFAULT 0, + RP_URL VARCHAR(255) NOT NULL, + TRUSTED_ALWAYS VARCHAR(128) DEFAULT 'FALSE', + LAST_VISIT DATE NOT NULL, + VISIT_COUNT INTEGER DEFAULT 0, + DEFAULT_PROFILE_NAME VARCHAR(255) DEFAULT 'DEFAULT', + PRIMARY KEY (USER_NAME, TENANT_ID, RP_URL)) +/ +CREATE TABLE IDN_OPENID_ASSOCIATIONS ( + HANDLE VARCHAR(255) NOT NULL, + ASSOC_TYPE VARCHAR(255) NOT NULL, + EXPIRE_IN TIMESTAMP NOT NULL, + MAC_KEY VARCHAR(255) NOT NULL, + ASSOC_STORE VARCHAR(128) DEFAULT 'SHARED', + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY (HANDLE)) +/ +CREATE TABLE IDN_STS_STORE ( + ID INTEGER, + TOKEN_ID VARCHAR(255) NOT NULL, + TOKEN_CONTENT BLOB NOT NULL, + CREATE_DATE TIMESTAMP NOT NULL, + EXPIRE_DATE TIMESTAMP NOT NULL, + STATE INTEGER DEFAULT 0, + PRIMARY KEY (ID)) +/ +CREATE SEQUENCE IDN_STS_STORE_SEQUENCE START WITH 1 INCREMENT BY 1 CACHE 20 ORDER +/ + +CREATE OR REPLACE TRIGGER IDN_STS_STORE_TRIGGER + BEFORE INSERT + ON IDN_STS_STORE + REFERENCING NEW AS NEW + FOR EACH ROW + BEGIN + SELECT IDN_STS_STORE_SEQUENCE.nextval INTO :NEW.ID FROM dual; + END; +/ +CREATE TABLE IDN_IDENTITY_USER_DATA ( + TENANT_ID INTEGER DEFAULT -1234, + USER_NAME VARCHAR(255) NOT NULL, + DATA_KEY VARCHAR(255) NOT NULL, + DATA_VALUE VARCHAR(255), + PRIMARY KEY (TENANT_ID, USER_NAME, DATA_KEY)) +/ +CREATE TABLE IDN_IDENTITY_META_DATA ( + USER_NAME VARCHAR(255) NOT NULL, + TENANT_ID INTEGER DEFAULT -1234, + METADATA_TYPE VARCHAR(255) NOT NULL, + METADATA VARCHAR(255) NOT NULL, + VALID VARCHAR(255) NOT NULL, + PRIMARY KEY (TENANT_ID, USER_NAME, METADATA_TYPE,METADATA)) +/ +CREATE TABLE IDN_THRIFT_SESSION ( + SESSION_ID VARCHAR2(255) NOT NULL, + USER_NAME VARCHAR2(255) NOT NULL, + CREATED_TIME VARCHAR2(255) NOT NULL, + LAST_MODIFIED_TIME VARCHAR2(255) NOT NULL, + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY (SESSION_ID) +) +/ +CREATE TABLE IDN_AUTH_SESSION_STORE ( + SESSION_ID VARCHAR (100) NOT NULL, + SESSION_TYPE VARCHAR(100) NOT NULL, + OPERATION VARCHAR(10) NOT NULL, + SESSION_OBJECT BLOB, + TIME_CREATED NUMBER(19), + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY (SESSION_ID, SESSION_TYPE, TIME_CREATED, OPERATION) +) +/ +CREATE TABLE SP_APP ( + ID INTEGER, + TENANT_ID INTEGER NOT NULL, + APP_NAME VARCHAR (255) NOT NULL , + USER_STORE VARCHAR (255) NOT NULL, + USERNAME VARCHAR (255) NOT NULL , + DESCRIPTION VARCHAR (1024), + ROLE_CLAIM VARCHAR (512), + AUTH_TYPE VARCHAR (255) NOT NULL, + PROVISIONING_USERSTORE_DOMAIN VARCHAR (512), + IS_LOCAL_CLAIM_DIALECT CHAR(1) DEFAULT '1', + IS_SEND_LOCAL_SUBJECT_ID CHAR(1) DEFAULT '0', + IS_SEND_AUTH_LIST_OF_IDPS CHAR(1) DEFAULT '0', + IS_USE_TENANT_DOMAIN_SUBJECT CHAR(1) DEFAULT '1', + IS_USE_USER_DOMAIN_SUBJECT CHAR(1) DEFAULT '1', + SUBJECT_CLAIM_URI VARCHAR (512), + IS_SAAS_APP CHAR(1) DEFAULT '0', + IS_DUMB_MODE CHAR(1) DEFAULT '0', + PRIMARY KEY (ID)) +/ +CREATE SEQUENCE SP_APP_SEQ START WITH 1 INCREMENT BY 1 CACHE 20 ORDER +/ +CREATE OR REPLACE TRIGGER SP_APP_TRIG + BEFORE INSERT + ON SP_APP + REFERENCING NEW AS NEW + FOR EACH ROW + BEGIN + SELECT SP_APP_SEQ.nextval INTO :NEW.ID FROM dual; + END; +/ +ALTER TABLE SP_APP ADD CONSTRAINT APPLICATION_NAME_CONSTRAINT UNIQUE(APP_NAME, TENANT_ID) +/ + +CREATE TABLE SP_METADATA ( + ID INTEGER, + SP_ID INTEGER, + NAME VARCHAR(255) NOT NULL, + VALUE VARCHAR(255) NOT NULL, + DISPLAY_NAME VARCHAR(255), + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY (ID), + CONSTRAINT SP_METADATA_CONSTRAINT UNIQUE (SP_ID, NAME), + FOREIGN KEY (SP_ID) REFERENCES SP_APP(ID) ON DELETE CASCADE) +/ +CREATE SEQUENCE SP_METADATA_SEQ START WITH 1 INCREMENT BY 1 CACHE 20 ORDER +/ +CREATE OR REPLACE TRIGGER SP_METADATA_TRIG + BEFORE INSERT + ON SP_METADATA + REFERENCING NEW AS NEW + FOR EACH ROW + BEGIN + SELECT SP_METADATA_SEQ.nextval INTO :NEW.ID FROM dual; + END; +/ + +CREATE TABLE SP_INBOUND_AUTH ( + ID INTEGER, + TENANT_ID INTEGER NOT NULL, + INBOUND_AUTH_KEY VARCHAR (255) NOT NULL, + INBOUND_AUTH_TYPE VARCHAR (255) NOT NULL, + PROP_NAME VARCHAR (255), + PROP_VALUE VARCHAR (1024) , + APP_ID INTEGER NOT NULL, + PRIMARY KEY (ID)) +/ +CREATE SEQUENCE SP_INBOUND_AUTH_SEQ START WITH 1 INCREMENT BY 1 CACHE 20 ORDER +/ +CREATE OR REPLACE TRIGGER SP_INBOUND_AUTH_TRIG + BEFORE INSERT + ON SP_INBOUND_AUTH + REFERENCING NEW AS NEW + FOR EACH ROW + BEGIN + SELECT SP_INBOUND_AUTH_SEQ.nextval INTO :NEW.ID FROM dual; + END; +/ +ALTER TABLE SP_INBOUND_AUTH ADD CONSTRAINT APPLICATION_ID_CONSTRAINT FOREIGN KEY (APP_ID) REFERENCES SP_APP (ID) ON DELETE CASCADE +/ +CREATE TABLE SP_AUTH_STEP ( + ID INTEGER, + TENANT_ID INTEGER NOT NULL, + STEP_ORDER INTEGER DEFAULT 1, + APP_ID INTEGER NOT NULL, + IS_SUBJECT_STEP CHAR(1) DEFAULT '0', + IS_ATTRIBUTE_STEP CHAR(1) DEFAULT '0', + PRIMARY KEY (ID)) +/ +CREATE SEQUENCE SP_AUTH_STEP_SEQ START WITH 1 INCREMENT BY 1 CACHE 20 ORDER +/ +CREATE OR REPLACE TRIGGER SP_AUTH_STEP_TRIG + BEFORE INSERT + ON SP_AUTH_STEP + REFERENCING NEW AS NEW + FOR EACH ROW + BEGIN + SELECT SP_AUTH_STEP_SEQ.nextval INTO :NEW.ID FROM dual; + END; +/ +ALTER TABLE SP_AUTH_STEP ADD CONSTRAINT APPLICATION_ID_CONSTRAINT_STEP FOREIGN KEY (APP_ID) REFERENCES SP_APP (ID) ON DELETE CASCADE +/ +CREATE TABLE SP_FEDERATED_IDP ( + ID INTEGER NOT NULL, + TENANT_ID INTEGER NOT NULL, + AUTHENTICATOR_ID INTEGER NOT NULL, + PRIMARY KEY (ID, AUTHENTICATOR_ID)) +/ +ALTER TABLE SP_FEDERATED_IDP ADD CONSTRAINT STEP_ID_CONSTRAINT FOREIGN KEY (ID) REFERENCES SP_AUTH_STEP (ID) ON DELETE CASCADE +/ +CREATE TABLE SP_CLAIM_MAPPING ( + ID INTEGER, + TENANT_ID INTEGER NOT NULL, + IDP_CLAIM VARCHAR (512) NOT NULL , + SP_CLAIM VARCHAR (512) NOT NULL , + APP_ID INTEGER NOT NULL, + IS_REQUESTED VARCHAR(128) DEFAULT '0', + DEFAULT_VALUE VARCHAR(255), + PRIMARY KEY (ID)) +/ +CREATE SEQUENCE SP_CLAIM_MAPPING_SEQ START WITH 1 INCREMENT BY 1 CACHE 20 ORDER +/ +CREATE OR REPLACE TRIGGER SP_CLAIM_MAPPING_TRIG + BEFORE INSERT + ON SP_CLAIM_MAPPING + REFERENCING NEW AS NEW + FOR EACH ROW + BEGIN + SELECT SP_CLAIM_MAPPING_SEQ.nextval INTO :NEW.ID FROM dual; + END; +/ +ALTER TABLE SP_CLAIM_MAPPING ADD CONSTRAINT CLAIMID_APPID_CONSTRAINT FOREIGN KEY (APP_ID) REFERENCES SP_APP (ID) ON DELETE CASCADE +/ +CREATE TABLE SP_ROLE_MAPPING ( + ID INTEGER, + TENANT_ID INTEGER NOT NULL, + IDP_ROLE VARCHAR (255) NOT NULL , + SP_ROLE VARCHAR (255) NOT NULL , + APP_ID INTEGER NOT NULL, + PRIMARY KEY (ID)) +/ +CREATE SEQUENCE SP_ROLE_MAPPING_SEQ START WITH 1 INCREMENT BY 1 CACHE 20 ORDER +/ +CREATE OR REPLACE TRIGGER SP_ROLE_MAPPING_TRIG + BEFORE INSERT + ON SP_ROLE_MAPPING + REFERENCING NEW AS NEW + FOR EACH ROW + BEGIN + SELECT SP_ROLE_MAPPING_SEQ.nextval INTO :NEW.ID FROM dual; + END; +/ +ALTER TABLE SP_ROLE_MAPPING ADD CONSTRAINT ROLEID_APPID_CONSTRAINT FOREIGN KEY (APP_ID) REFERENCES SP_APP (ID) ON DELETE CASCADE +/ +CREATE TABLE SP_REQ_PATH_AUTHENTICATOR ( + ID INTEGER, + TENANT_ID INTEGER NOT NULL, + AUTHENTICATOR_NAME VARCHAR (255) NOT NULL , + APP_ID INTEGER NOT NULL, + PRIMARY KEY (ID)) +/ +CREATE SEQUENCE SP_REQ_PATH_AUTH_SEQ START WITH 1 INCREMENT BY 1 CACHE 20 ORDER +/ +CREATE OR REPLACE TRIGGER SP_REQ_PATH_AUTH_TRIG + BEFORE INSERT + ON SP_REQ_PATH_AUTHENTICATOR + REFERENCING NEW AS NEW + FOR EACH ROW + BEGIN + SELECT SP_REQ_PATH_AUTH_SEQ.nextval INTO :NEW.ID FROM dual; + END; +/ +ALTER TABLE SP_REQ_PATH_AUTHENTICATOR ADD CONSTRAINT REQ_AUTH_APPID_CONSTRAINT FOREIGN KEY (APP_ID) REFERENCES SP_APP (ID) ON DELETE CASCADE +/ +CREATE TABLE SP_PROVISIONING_CONNECTOR ( + ID INTEGER, + TENANT_ID INTEGER NOT NULL, + IDP_NAME VARCHAR (255) NOT NULL , + CONNECTOR_NAME VARCHAR (255) NOT NULL , + APP_ID INTEGER NOT NULL, + IS_JIT_ENABLED CHAR(1) DEFAULT '0', + BLOCKING CHAR(1) DEFAULT '0', + PRIMARY KEY (ID)) +/ +CREATE SEQUENCE SP_PROV_CONNECTOR_SEQ START WITH 1 INCREMENT BY 1 CACHE 20 ORDER +/ +CREATE OR REPLACE TRIGGER SP_PROV_CONNECTOR_TRIG + BEFORE INSERT + ON SP_PROVISIONING_CONNECTOR + REFERENCING NEW AS NEW + FOR EACH ROW + BEGIN + SELECT SP_PROV_CONNECTOR_SEQ.nextval INTO :NEW.ID FROM dual; + END; +/ +ALTER TABLE SP_PROVISIONING_CONNECTOR ADD CONSTRAINT PRO_CONNECTOR_APPID_CONSTRAINT FOREIGN KEY (APP_ID) REFERENCES SP_APP (ID) ON DELETE CASCADE +/ +CREATE TABLE IDP ( + ID INTEGER, + TENANT_ID INTEGER, + NAME VARCHAR(254) NOT NULL, + IS_ENABLED CHAR(1) DEFAULT '1', + IS_PRIMARY CHAR(1) DEFAULT '0', + HOME_REALM_ID VARCHAR(254), + IMAGE BLOB, + CERTIFICATE BLOB, + ALIAS VARCHAR(254), + INBOUND_PROV_ENABLED CHAR (1) DEFAULT '0', + INBOUND_PROV_USER_STORE_ID VARCHAR(254), + USER_CLAIM_URI VARCHAR(254), + ROLE_CLAIM_URI VARCHAR(254), + DESCRIPTION VARCHAR (1024), + DEFAULT_AUTHENTICATOR_NAME VARCHAR(254), + DEFAULT_PRO_CONNECTOR_NAME VARCHAR(254), + PROVISIONING_ROLE VARCHAR(128), + IS_FEDERATION_HUB CHAR(1) DEFAULT '0', + IS_LOCAL_CLAIM_DIALECT CHAR(1) DEFAULT '0', + DISPLAY_NAME VARCHAR(254), + PRIMARY KEY (ID), + UNIQUE (TENANT_ID, NAME)) +/ +CREATE SEQUENCE IDP_SEQ START WITH 1 INCREMENT BY 1 CACHE 20 ORDER +/ +CREATE OR REPLACE TRIGGER IDP_TRIG + BEFORE INSERT + ON IDP + REFERENCING NEW AS NEW + FOR EACH ROW + BEGIN + SELECT IDP_SEQ.nextval INTO :NEW.ID FROM dual; + END; +/ +INSERT INTO IDP (TENANT_ID, NAME, HOME_REALM_ID) VALUES (-1234, 'LOCAL', 'localhost') +/ +CREATE TABLE IDP_ROLE ( + ID INTEGER, + IDP_ID INTEGER, + TENANT_ID INTEGER, + ROLE VARCHAR(254), + PRIMARY KEY (ID), + UNIQUE (IDP_ID, ROLE), + FOREIGN KEY (IDP_ID) REFERENCES IDP(ID) ON DELETE CASCADE) +/ +CREATE SEQUENCE IDP_ROLE_SEQ START WITH 1 INCREMENT BY 1 CACHE 20 ORDER +/ +CREATE OR REPLACE TRIGGER IDP_ROLE_TRIG + BEFORE INSERT + ON IDP_ROLE + REFERENCING NEW AS NEW + FOR EACH ROW + BEGIN + SELECT IDP_ROLE_SEQ.nextval INTO :NEW.ID FROM dual; + END; +/ +CREATE TABLE IDP_ROLE_MAPPING ( + ID INTEGER, + IDP_ROLE_ID INTEGER, + TENANT_ID INTEGER, + USER_STORE_ID VARCHAR (253), + LOCAL_ROLE VARCHAR(253), + PRIMARY KEY (ID), + UNIQUE (IDP_ROLE_ID, TENANT_ID, USER_STORE_ID, LOCAL_ROLE), + FOREIGN KEY (IDP_ROLE_ID) REFERENCES IDP_ROLE(ID) ON DELETE CASCADE) +/ +CREATE SEQUENCE IDP_ROLE_MAPPING_SEQ START WITH 1 INCREMENT BY 1 CACHE 20 ORDER +/ +CREATE OR REPLACE TRIGGER IDP_ROLE_MAPPING_TRIG + BEFORE INSERT + ON IDP_ROLE_MAPPING + REFERENCING NEW AS NEW + FOR EACH ROW + BEGIN + SELECT IDP_ROLE_MAPPING_SEQ.nextval INTO :NEW.ID FROM dual; + END; +/ +CREATE TABLE IDP_CLAIM ( + ID INTEGER, + IDP_ID INTEGER, + TENANT_ID INTEGER, + CLAIM VARCHAR(254), + PRIMARY KEY (ID), + UNIQUE (IDP_ID, CLAIM), + FOREIGN KEY (IDP_ID) REFERENCES IDP(ID) ON DELETE CASCADE) +/ +CREATE SEQUENCE IDP_CLAIM_SEQ START WITH 1 INCREMENT BY 1 CACHE 20 ORDER +/ +CREATE OR REPLACE TRIGGER IDP_CLAIM_TRIG + BEFORE INSERT + ON IDP_CLAIM + REFERENCING NEW AS NEW + FOR EACH ROW + BEGIN + SELECT IDP_CLAIM_SEQ.nextval INTO :NEW.ID FROM dual; + END; +/ +CREATE TABLE IDP_CLAIM_MAPPING ( + ID INTEGER, + IDP_CLAIM_ID INTEGER, + TENANT_ID INTEGER, + LOCAL_CLAIM VARCHAR(253), + DEFAULT_VALUE VARCHAR(255), + IS_REQUESTED VARCHAR(128) DEFAULT '0', + PRIMARY KEY (ID), + UNIQUE (IDP_CLAIM_ID, TENANT_ID, LOCAL_CLAIM), + FOREIGN KEY (IDP_CLAIM_ID) REFERENCES IDP_CLAIM(ID) ON DELETE CASCADE) +/ +CREATE SEQUENCE IDP_CLAIM_MAPPING_SEQ START WITH 1 INCREMENT BY 1 CACHE 20 ORDER +/ +CREATE OR REPLACE TRIGGER IDP_CLAIM_MAPPING_TRIG + BEFORE INSERT + ON IDP_CLAIM_MAPPING + REFERENCING NEW AS NEW + FOR EACH ROW + BEGIN + SELECT IDP_CLAIM_MAPPING_SEQ.nextval INTO :NEW.ID FROM dual; + END; +/ +CREATE TABLE IDP_AUTHENTICATOR ( + ID INTEGER, + TENANT_ID INTEGER, + IDP_ID INTEGER, + NAME VARCHAR(255) NOT NULL, + IS_ENABLED CHAR (1) DEFAULT '1', + DISPLAY_NAME VARCHAR(255), + PRIMARY KEY (ID), + UNIQUE (TENANT_ID, IDP_ID, NAME), + FOREIGN KEY (IDP_ID) REFERENCES IDP(ID) ON DELETE CASCADE) +/ +CREATE SEQUENCE IDP_AUTHENTICATOR_SEQ START WITH 1 INCREMENT BY 1 CACHE 20 ORDER +/ +CREATE OR REPLACE TRIGGER IDP_AUTHENTICATOR_TRIG + BEFORE INSERT + ON IDP_AUTHENTICATOR + REFERENCING NEW AS NEW + FOR EACH ROW + BEGIN + SELECT IDP_AUTHENTICATOR_SEQ.nextval INTO :NEW.ID FROM dual; + END; +/ +INSERT INTO IDP_AUTHENTICATOR (TENANT_ID, IDP_ID, NAME) VALUES (-1234, 1, 'samlsso') +/ +INSERT INTO IDP_AUTHENTICATOR (TENANT_ID, IDP_ID, NAME) VALUES (-1234, 1, 'IDPProperties') +/ +INSERT INTO IDP_AUTHENTICATOR (TENANT_ID, IDP_ID, NAME) VALUES (-1234, 1, 'passivests') +/ + +CREATE TABLE IDP_METADATA ( + ID INTEGER, + IDP_ID INTEGER, + NAME VARCHAR(255) NOT NULL, + VALUE VARCHAR(255) NOT NULL, + DISPLAY_NAME VARCHAR(255), + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY (ID), + CONSTRAINT IDP_METADATA_CONSTRAINT UNIQUE (IDP_ID, NAME), + FOREIGN KEY (IDP_ID) REFERENCES IDP(ID) ON DELETE CASCADE) +/ +CREATE SEQUENCE IDP_METADATA_SEQ START WITH 1 INCREMENT BY 1 CACHE 20 ORDER +/ +CREATE OR REPLACE TRIGGER IDP_METADATA_TRIG + BEFORE INSERT + ON IDP_METADATA + REFERENCING NEW AS NEW + FOR EACH ROW + BEGIN + SELECT IDP_METADATA_SEQ.nextval INTO :NEW.ID FROM dual; + END; + +/ +INSERT INTO IDP_METADATA (IDP_ID, NAME, VALUE, DISPLAY_NAME) VALUES (1, 'SessionIdleTimeout', '20160', 'Session Idle Timeout') +/ +INSERT INTO IDP_METADATA (IDP_ID, NAME, VALUE, DISPLAY_NAME) VALUES (1, 'RememberMeTimeout', '15', 'RememberMe Timeout') +/ + +CREATE TABLE IDP_AUTHENTICATOR_PROPERTY ( + ID INTEGER, + TENANT_ID INTEGER, + AUTHENTICATOR_ID INTEGER, + PROPERTY_KEY VARCHAR(255) NOT NULL, + PROPERTY_VALUE VARCHAR(2047), + IS_SECRET CHAR (1) DEFAULT '0', + PRIMARY KEY (ID), + UNIQUE (TENANT_ID, AUTHENTICATOR_ID, PROPERTY_KEY), + FOREIGN KEY (AUTHENTICATOR_ID) REFERENCES IDP_AUTHENTICATOR(ID) ON DELETE CASCADE) +/ +CREATE SEQUENCE IDP_AUTHENTICATOR_PROP_SEQ START WITH 1 INCREMENT BY 1 CACHE 20 ORDER +/ +CREATE OR REPLACE TRIGGER IDP_AUTHENTICATOR_PROP_TRIG + BEFORE INSERT + ON IDP_AUTHENTICATOR_PROPERTY + REFERENCING NEW AS NEW + FOR EACH ROW + BEGIN + SELECT IDP_AUTHENTICATOR_PROP_SEQ.nextval INTO :NEW.ID FROM dual; + END; +/ +INSERT INTO IDP_AUTHENTICATOR_PROPERTY (TENANT_ID, AUTHENTICATOR_ID, PROPERTY_KEY,PROPERTY_VALUE, IS_SECRET ) VALUES (-1234, 1 , 'IdPEntityId', 'localhost', '0') +/ +INSERT INTO IDP_AUTHENTICATOR_PROPERTY (TENANT_ID, AUTHENTICATOR_ID, PROPERTY_KEY,PROPERTY_VALUE, IS_SECRET ) VALUES (-1234, 3 , 'IdPEntityId', 'localhost', '0') +/ +CREATE TABLE IDP_PROVISIONING_CONFIG ( + ID INTEGER, + TENANT_ID INTEGER, + IDP_ID INTEGER, + PROVISIONING_CONNECTOR_TYPE VARCHAR(255) NOT NULL, + IS_ENABLED CHAR (1) DEFAULT '0', + IS_BLOCKING CHAR (1) DEFAULT '0', + PRIMARY KEY (ID), + UNIQUE (TENANT_ID, IDP_ID, PROVISIONING_CONNECTOR_TYPE), + FOREIGN KEY (IDP_ID) REFERENCES IDP(ID) ON DELETE CASCADE) +/ +CREATE SEQUENCE IDP_PROVISIONING_CONFIG_SEQ START WITH 1 INCREMENT BY 1 CACHE 20 ORDER +/ +CREATE OR REPLACE TRIGGER IDP_PROVISIONING_CONFIG_TRIG + BEFORE INSERT + ON IDP_PROVISIONING_CONFIG + REFERENCING NEW AS NEW + FOR EACH ROW + BEGIN + SELECT IDP_PROVISIONING_CONFIG_SEQ.nextval INTO :NEW.ID FROM dual; + END; +/ +CREATE TABLE IDP_PROV_CONFIG_PROPERTY ( + ID INTEGER, + TENANT_ID INTEGER, + PROVISIONING_CONFIG_ID INTEGER, + PROPERTY_KEY VARCHAR(255) NOT NULL, + PROPERTY_VALUE VARCHAR(2048), + PROPERTY_BLOB_VALUE BLOB, + PROPERTY_TYPE CHAR(32) NOT NULL, + IS_SECRET CHAR (1) DEFAULT '0', + PRIMARY KEY (ID), + UNIQUE (TENANT_ID, PROVISIONING_CONFIG_ID, PROPERTY_KEY), + FOREIGN KEY (PROVISIONING_CONFIG_ID) REFERENCES IDP_PROVISIONING_CONFIG(ID) ON DELETE CASCADE) +/ +CREATE SEQUENCE IDP_PROV_CONFIG_PROP_SEQ START WITH 1 INCREMENT BY 1 CACHE 20 ORDER +/ +CREATE OR REPLACE TRIGGER IDP_PROV_CONFIG_PROP_TRIG + BEFORE INSERT + ON IDP_PROV_CONFIG_PROPERTY + REFERENCING NEW AS NEW + FOR EACH ROW + BEGIN + SELECT IDP_PROV_CONFIG_PROP_SEQ.nextval INTO :NEW.ID FROM dual; + END; +/ +CREATE TABLE IDP_PROVISIONING_ENTITY ( + ID INTEGER, + PROVISIONING_CONFIG_ID INTEGER, + ENTITY_TYPE VARCHAR(255) NOT NULL, + ENTITY_LOCAL_USERSTORE VARCHAR(255) NOT NULL, + ENTITY_NAME VARCHAR(255) NOT NULL, + ENTITY_VALUE VARCHAR(255), + TENANT_ID INTEGER, + ENTITY_LOCAL_ID VARCHAR(255), + PRIMARY KEY (ID), + UNIQUE (ENTITY_TYPE, TENANT_ID, ENTITY_LOCAL_USERSTORE, ENTITY_NAME, PROVISIONING_CONFIG_ID), + UNIQUE (PROVISIONING_CONFIG_ID, ENTITY_TYPE, ENTITY_VALUE), + FOREIGN KEY (PROVISIONING_CONFIG_ID) REFERENCES IDP_PROVISIONING_CONFIG(ID) ON DELETE CASCADE) +/ +CREATE SEQUENCE IDP_PROV_ENTITY_SEQ START WITH 1 INCREMENT BY 1 CACHE 20 ORDER +/ +CREATE OR REPLACE TRIGGER IDP_PROV_ENTITY_TRIG + BEFORE INSERT + ON IDP_PROVISIONING_ENTITY + REFERENCING NEW AS NEW + FOR EACH ROW + BEGIN + SELECT IDP_PROV_ENTITY_SEQ.nextval INTO :NEW.ID FROM dual; + END; +/ +CREATE TABLE IDP_LOCAL_CLAIM ( + ID INTEGER, + TENANT_ID INTEGER, + IDP_ID INTEGER, + CLAIM_URI VARCHAR(255) NOT NULL, + DEFAULT_VALUE VARCHAR(255), + IS_REQUESTED VARCHAR(128) DEFAULT '0', + PRIMARY KEY (ID), + UNIQUE (TENANT_ID, IDP_ID, CLAIM_URI), + FOREIGN KEY (IDP_ID) REFERENCES IDP(ID) ON DELETE CASCADE) +/ +CREATE SEQUENCE IDP_LOCAL_CLAIM_SEQ START WITH 1 INCREMENT BY 1 CACHE 20 ORDER +/ +CREATE OR REPLACE TRIGGER IDP_LOCAL_CLAIM_TRIG + BEFORE INSERT + ON IDP_LOCAL_CLAIM + REFERENCING NEW AS NEW + FOR EACH ROW + BEGIN + SELECT IDP_LOCAL_CLAIM_SEQ.nextval INTO :NEW.ID FROM dual; + END; +/ +CREATE TABLE IDN_ASSOCIATED_ID ( + ID INTEGER, + IDP_USER_ID VARCHAR(255) NOT NULL, + TENANT_ID INTEGER DEFAULT -1234, + IDP_ID INTEGER NOT NULL, + DOMAIN_NAME VARCHAR(255) NOT NULL, + USER_NAME VARCHAR(255) NOT NULL, + PRIMARY KEY (ID), + UNIQUE(IDP_USER_ID, TENANT_ID, IDP_ID), + FOREIGN KEY (IDP_ID) REFERENCES IDP(ID) ON DELETE CASCADE +) +/ +CREATE SEQUENCE IDN_ASSOCIATED_ID_SEQ START WITH 1 INCREMENT BY 1 NOCACHE +/ +CREATE OR REPLACE TRIGGER IDN_ASSOCIATED_ID_TRIG + BEFORE INSERT + ON IDN_ASSOCIATED_ID + REFERENCING NEW AS NEW + FOR EACH ROW + BEGIN + SELECT IDN_ASSOCIATED_ID_SEQ.nextval INTO :NEW.ID FROM dual; + END; +/ +CREATE TABLE IDN_USER_ACCOUNT_ASSOCIATION ( + ASSOCIATION_KEY VARCHAR(255) NOT NULL, + TENANT_ID INTEGER, + DOMAIN_NAME VARCHAR(255) NOT NULL, + USER_NAME VARCHAR(255) NOT NULL, + PRIMARY KEY (TENANT_ID, DOMAIN_NAME, USER_NAME)) +/ +CREATE TABLE FIDO_DEVICE_STORE ( + TENANT_ID INTEGER, + DOMAIN_NAME VARCHAR(255) NOT NULL, + USER_NAME VARCHAR(45) NOT NULL, + TIME_REGISTERED TIMESTAMP, + KEY_HANDLE VARCHAR(200) NOT NULL, + DEVICE_DATA VARCHAR(2048) NOT NULL, + PRIMARY KEY (TENANT_ID, DOMAIN_NAME, USER_NAME, KEY_HANDLE)) +/ + +CREATE TABLE WF_REQUEST ( + UUID VARCHAR2 (45), + CREATED_BY VARCHAR2 (255), + TENANT_ID INTEGER DEFAULT -1, + OPERATION_TYPE VARCHAR2 (50), + CREATED_AT TIMESTAMP, + UPDATED_AT TIMESTAMP, + STATUS VARCHAR2 (30), + REQUEST BLOB, + PRIMARY KEY (UUID)) +/ + +CREATE TABLE WF_BPS_PROFILE ( + PROFILE_NAME VARCHAR2(45), + HOST_URL_MANAGER VARCHAR2(45), + HOST_URL_WORKER VARCHAR2(45), + USERNAME VARCHAR2(45), + PASSWORD VARCHAR2(255), + CALLBACK_HOST VARCHAR2 (45), + CALLBACK_USERNAME VARCHAR2 (45), + CALLBACK_PASSWORD VARCHAR2 (255), + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY (PROFILE_NAME, TENANT_ID)) +/ + +CREATE TABLE WF_WORKFLOW( + ID VARCHAR2 (45), + WF_NAME VARCHAR2 (45), + DESCRIPTION VARCHAR2 (255), + TEMPLATE_ID VARCHAR2 (45), + IMPL_ID VARCHAR2 (45), + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY (ID)) +/ + +CREATE TABLE WF_WORKFLOW_ASSOCIATION( + ID INTEGER, + ASSOC_NAME VARCHAR2 (45), + EVENT_ID VARCHAR2(45), + ASSOC_CONDITION VARCHAR2 (2000), + WORKFLOW_ID VARCHAR2 (45), + IS_ENABLED CHAR (1) DEFAULT '1', + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY(ID), + FOREIGN KEY (WORKFLOW_ID) REFERENCES WF_WORKFLOW(ID)ON DELETE CASCADE) +/ + +CREATE SEQUENCE WF_WORKFLOW_ASSOCIATION_SEQ START WITH 1 INCREMENT BY 1 CACHE 20 ORDER +/ + +CREATE OR REPLACE TRIGGER WF_WORKFLOW_ASSOCIATION_TRIG +BEFORE INSERT +ON WF_WORKFLOW_ASSOCIATION +REFERENCING NEW AS NEW +FOR EACH ROW + BEGIN + SELECT WF_WORKFLOW_ASSOCIATION_SEQ.nextval + INTO :NEW.ID + FROM dual; + END; +/ + +CREATE TABLE WF_WORKFLOW_CONFIG_PARAM( + WORKFLOW_ID VARCHAR2 (45), + PARAM_NAME VARCHAR2 (45), + PARAM_VALUE VARCHAR2 (1000), + PARAM_QNAME VARCHAR2 (45), + PARAM_HOLDER VARCHAR2 (45), + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY (WORKFLOW_ID, PARAM_NAME, PARAM_QNAME, PARAM_HOLDER), + FOREIGN KEY (WORKFLOW_ID) REFERENCES WF_WORKFLOW(ID)ON DELETE CASCADE) +/ + +CREATE TABLE WF_REQUEST_ENTITY_RELATIONSHIP( + REQUEST_ID VARCHAR2 (45), + ENTITY_NAME VARCHAR2 (255), + ENTITY_TYPE VARCHAR2 (50), + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY(REQUEST_ID, ENTITY_NAME, ENTITY_TYPE, TENANT_ID), + FOREIGN KEY (REQUEST_ID) REFERENCES WF_REQUEST(UUID)ON DELETE CASCADE) +/ + +CREATE TABLE WF_WORKFLOW_REQUEST_RELATION( + RELATIONSHIP_ID VARCHAR2 (45), + WORKFLOW_ID VARCHAR2 (45), + REQUEST_ID VARCHAR2 (45), + UPDATED_AT TIMESTAMP, + STATUS VARCHAR (30), + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY (RELATIONSHIP_ID), + FOREIGN KEY (WORKFLOW_ID) REFERENCES WF_WORKFLOW(ID)ON DELETE CASCADE, + FOREIGN KEY (REQUEST_ID) REFERENCES WF_REQUEST(UUID)ON DELETE CASCADE) +/ + +-- End of IDENTITY Tables-- + +-- Start of API-MGT Tables-- +CREATE TABLE AM_SUBSCRIBER ( + SUBSCRIBER_ID INTEGER, + USER_ID VARCHAR2(50) NOT NULL, + TENANT_ID INTEGER NOT NULL, + EMAIL_ADDRESS VARCHAR2(256) NULL, + DATE_SUBSCRIBED DATE NOT NULL, + CREATED_BY VARCHAR2(100), + CREATED_TIME DATE, + UPDATED_BY VARCHAR2(100), + UPDATED_TIME DATE, + PRIMARY KEY (SUBSCRIBER_ID), + UNIQUE (TENANT_ID,USER_ID) +) +/ + +CREATE SEQUENCE AM_SUBSCRIBER_SEQUENCE START WITH 1 INCREMENT BY 1 CACHE 20 ORDER +/ + +CREATE OR REPLACE TRIGGER AM_SUBSCRIBER_TRIGGER + BEFORE INSERT + ON AM_SUBSCRIBER + REFERENCING NEW AS NEW + FOR EACH ROW + BEGIN + SELECT AM_SUBSCRIBER_SEQUENCE.nextval INTO :NEW.SUBSCRIBER_ID FROM dual; + END; +/ +-- TODO: Have to add ON UPDATE CASCADE for the FOREIGN KEY(SUBSCRIBER_ID) relation +CREATE TABLE AM_APPLICATION ( + APPLICATION_ID INTEGER, + NAME VARCHAR2(100), + SUBSCRIBER_ID INTEGER, + APPLICATION_TIER VARCHAR2(50) DEFAULT 'Unlimited', + CALLBACK_URL VARCHAR2(512), + DESCRIPTION VARCHAR2(512), + APPLICATION_STATUS VARCHAR2(50) DEFAULT 'APPROVED', + CREATED_BY VARCHAR2(100), + CREATED_TIME DATE, + UPDATED_BY VARCHAR2(100), + UPDATED_TIME DATE, + FOREIGN KEY(SUBSCRIBER_ID) REFERENCES AM_SUBSCRIBER(SUBSCRIBER_ID) ON DELETE CASCADE, + PRIMARY KEY(APPLICATION_ID), + UNIQUE (NAME,SUBSCRIBER_ID) +) +/ + +CREATE SEQUENCE AM_APPLICATION_SEQUENCE START WITH 1 INCREMENT BY 1 CACHE 20 ORDER +/ + +CREATE OR REPLACE TRIGGER AM_APPLICATION_TRIGGER + BEFORE INSERT + ON AM_APPLICATION + REFERENCING NEW AS NEW + FOR EACH ROW + BEGIN + SELECT AM_APPLICATION_SEQUENCE.nextval INTO :NEW.APPLICATION_ID FROM dual; + END; +/ + +CREATE TABLE AM_API ( + API_ID INTEGER, + API_PROVIDER VARCHAR2(256), + API_NAME VARCHAR2(256), + API_VERSION VARCHAR2(30), + CONTEXT VARCHAR2(256), + CONTEXT VARCHAR2(256), + CREATED_BY VARCHAR2(100), + CREATED_TIME DATE, + UPDATED_BY VARCHAR2(100), + UPDATED_TIME DATE, + PRIMARY KEY(API_ID), + UNIQUE (API_PROVIDER,API_NAME,API_VERSION) +) +/ + +CREATE SEQUENCE AM_API_SEQUENCE START WITH 1 INCREMENT BY 1 CACHE 20 ORDER +/ + +CREATE OR REPLACE TRIGGER AM_API_TRIGGER + BEFORE INSERT + ON AM_API + REFERENCING NEW AS NEW + FOR EACH ROW + BEGIN + SELECT AM_API_SEQUENCE.nextval INTO :NEW.API_ID FROM dual; + END; +/ + +CREATE TABLE AM_API_URL_MAPPING ( + URL_MAPPING_ID INTEGER, + API_ID INTEGER NOT NULL, + HTTP_METHOD VARCHAR(20) NULL, + AUTH_SCHEME VARCHAR(50) NULL, + URL_PATTERN VARCHAR(512) NULL, + THROTTLING_TIER varchar(512) DEFAULT NULL, + MEDIATION_SCRIPT BLOB, + PRIMARY KEY(URL_MAPPING_ID) +) +/ + +CREATE SEQUENCE AM_API_URL_MAPPING_SEQUENCE START WITH 1 INCREMENT BY 1 CACHE 20 ORDER +/ + +CREATE OR REPLACE TRIGGER AM_API_URL_MAPPING_TRIGGER + BEFORE INSERT + ON AM_API_URL_MAPPING + REFERENCING NEW AS NEW + FOR EACH ROW + BEGIN + SELECT AM_API_URL_MAPPING_SEQUENCE.nextval INTO :NEW.URL_MAPPING_ID FROM dual; + END; +/ + +-- TODO: Have to add ON UPDATE CASCADE for the FOREIGN KEY(SUBSCRIPTION_ID) relation +CREATE TABLE AM_SUBSCRIPTION ( + SUBSCRIPTION_ID INTEGER, + TIER_ID VARCHAR2(50), + API_ID INTEGER, + LAST_ACCESSED DATE NULL, + APPLICATION_ID INTEGER, + SUB_STATUS VARCHAR(50), + SUBS_CREATE_STATE VARCHAR(50) DEFAULT 'SUBSCRIBE', + CREATED_BY VARCHAR2(100), + CREATED_TIME DATE, + UPDATED_BY VARCHAR2(100), + UPDATED_TIME DATE, + FOREIGN KEY(APPLICATION_ID) REFERENCES AM_APPLICATION(APPLICATION_ID) ON DELETE CASCADE, + FOREIGN KEY(API_ID) REFERENCES AM_API(API_ID) ON DELETE CASCADE, + PRIMARY KEY (SUBSCRIPTION_ID) +) +/ + +CREATE SEQUENCE AM_SUBSCRIPTION_SEQUENCE START WITH 1 INCREMENT BY 1 CACHE 20 ORDER +/ + +CREATE OR REPLACE TRIGGER AM_SUBSCRIPTION_TRIGGER + BEFORE INSERT + ON AM_SUBSCRIPTION + REFERENCING NEW AS NEW + FOR EACH ROW + BEGIN + SELECT AM_SUBSCRIPTION_SEQUENCE.nextval INTO :NEW.SUBSCRIPTION_ID FROM dual; + END; +/ +-- TODO: Have to add ON UPDATE CASCADE for the FOREIGN KEY(APPLICATION_ID) and FOREIGN KEY(API_ID) relations +CREATE TABLE AM_SUBSCRIPTION_KEY_MAPPING ( + SUBSCRIPTION_ID INTEGER, + ACCESS_TOKEN VARCHAR2(512), + KEY_TYPE VARCHAR2(512) NOT NULL, + FOREIGN KEY(SUBSCRIPTION_ID) REFERENCES AM_SUBSCRIPTION(SUBSCRIPTION_ID) ON DELETE CASCADE, + PRIMARY KEY(SUBSCRIPTION_ID,ACCESS_TOKEN) +) +/ +--TODO: Have to add ON UPDATE CASCADE for the FOREIGN KEY(APPLICATION_ID) relation +CREATE TABLE AM_APPLICATION_KEY_MAPPING ( + APPLICATION_ID INTEGER, + CONSUMER_KEY VARCHAR2(512), + KEY_TYPE VARCHAR2(512) NOT NULL, + STATE VARCHAR2(30) NOT NULL, + FOREIGN KEY(APPLICATION_ID) REFERENCES AM_APPLICATION(APPLICATION_ID) ON DELETE CASCADE, + PRIMARY KEY(APPLICATION_ID,KEY_TYPE) +) +/ + +CREATE TABLE AM_APPLICATION_REGISTRATION ( + REG_ID INTEGER , + SUBSCRIBER_ID INTEGER, + WF_REF VARCHAR2(255) NOT NULL, + APP_ID INTEGER, + TOKEN_TYPE VARCHAR2(30), + TOKEN_SCOPE VARCHAR2(256) DEFAULT 'default', + ALLOWED_DOMAINS VARCHAR2(256), + VALIDITY_PERIOD NUMBER(19), + UNIQUE (SUBSCRIBER_ID,APP_ID,TOKEN_TYPE), + FOREIGN KEY(SUBSCRIBER_ID) REFERENCES AM_SUBSCRIBER(SUBSCRIBER_ID), + FOREIGN KEY(APP_ID) REFERENCES AM_APPLICATION(APPLICATION_ID), + PRIMARY KEY (REG_ID) +) +/ +-- TODO: Have to add ON UPDATE CASCADE for the FOREIGN KEY(API_ID) relation +CREATE TABLE AM_API_LC_EVENT ( + EVENT_ID INTEGER, + API_ID INTEGER NOT NULL, + PREVIOUS_STATE VARCHAR2(50), + NEW_STATE VARCHAR2(50) NOT NULL, + USER_ID VARCHAR2(50) NOT NULL, + TENANT_ID INTEGER NOT NULL, + EVENT_DATE DATE NOT NULL, + FOREIGN KEY(API_ID) REFERENCES AM_API(API_ID) ON DELETE CASCADE, + PRIMARY KEY (EVENT_ID) +) +/ + +CREATE TABLE AM_APP_KEY_DOMAIN_MAPPING ( + CONSUMER_KEY VARCHAR(255), + AUTHZ_DOMAIN VARCHAR(255) DEFAULT 'ALL', + PRIMARY KEY (CONSUMER_KEY,AUTHZ_DOMAIN) + +) +/ + +CREATE TABLE AM_API_COMMENTS ( + COMMENT_ID INTEGER, + COMMENT_TEXT VARCHAR2(512), + COMMENTED_USER VARCHAR2(255), + DATE_COMMENTED DATE NOT NULL, + API_ID INTEGER NOT NULL, + FOREIGN KEY(API_ID) REFERENCES AM_API(API_ID) ON DELETE CASCADE, + PRIMARY KEY (COMMENT_ID) +) +/ + +CREATE SEQUENCE AM_API_COMMENTS_SEQUENCE START WITH 1 INCREMENT BY 1 CACHE 20 ORDER +/ + +CREATE OR REPLACE TRIGGER AM_API_COMMENTS_TRIGGER + BEFORE INSERT + ON AM_API_COMMENTS + REFERENCING NEW AS NEW + FOR EACH ROW + BEGIN + SELECT AM_API_COMMENTS_SEQUENCE.nextval INTO :NEW.COMMENT_ID FROM dual; + END; +/ + +CREATE TABLE AM_API_RATINGS ( + RATING_ID INTEGER, + API_ID INTEGER, + RATING INTEGER, + SUBSCRIBER_ID INTEGER, + FOREIGN KEY(API_ID) REFERENCES AM_API(API_ID) ON DELETE CASCADE, + FOREIGN KEY(SUBSCRIBER_ID) REFERENCES AM_SUBSCRIBER(SUBSCRIBER_ID) ON DELETE CASCADE, + PRIMARY KEY (RATING_ID) +) +/ + +CREATE SEQUENCE AM_API_RATINGS_SEQUENCE START WITH 1 INCREMENT BY 1 CACHE 20 ORDER +/ + +CREATE OR REPLACE TRIGGER AM_API_RATINGS_TRIGGER + BEFORE INSERT + ON AM_API_RATINGS + REFERENCING NEW AS NEW + FOR EACH ROW + BEGIN + SELECT AM_API_RATINGS_SEQUENCE.nextval INTO :NEW.RATING_ID FROM dual; + END; +/ + +CREATE TABLE AM_TIER_PERMISSIONS ( + TIER_PERMISSIONS_ID INTEGER, + TIER VARCHAR2(50) NOT NULL, + PERMISSIONS_TYPE VARCHAR2(50) NOT NULL, + ROLES VARCHAR2(512) NOT NULL, + TENANT_ID INTEGER NOT NULL, + PRIMARY KEY(TIER_PERMISSIONS_ID) +) +/ + +CREATE SEQUENCE AM_TIER_PERMISSIONS_SEQUENCE START WITH 1 INCREMENT BY 1 CACHE 20 ORDER +/ + +CREATE OR REPLACE TRIGGER AM_TIER_PERMISSIONS_TRIGGER + BEFORE INSERT + ON AM_TIER_PERMISSIONS + REFERENCING NEW AS NEW + FOR EACH ROW + BEGIN + SELECT AM_TIER_PERMISSIONS_SEQUENCE.nextval INTO :NEW.TIER_PERMISSIONS_ID FROM dual; + END; +/ + +CREATE SEQUENCE AM_API_LC_EVENT_SEQUENCE START WITH 1 INCREMENT BY 1 CACHE 20 ORDER +/ + +CREATE OR REPLACE TRIGGER AM_API_LC_EVENT_TRIGGER + BEFORE INSERT + ON AM_API_LC_EVENT + REFERENCING NEW AS NEW + FOR EACH ROW + BEGIN + SELECT AM_API_LC_EVENT_SEQUENCE.nextval INTO :NEW.EVENT_ID FROM dual; + END; +/ +-- Start of IDP-APPLICATION-MGT Tables -- + +-- End of IDP-APPLICATION-MGT Tables -- + + +CREATE TABLE AM_EXTERNAL_STORES ( + APISTORE_ID INTEGER, + API_ID INTEGER, + STORE_ID VARCHAR2(255) NOT NULL, + STORE_DISPLAY_NAME VARCHAR2(255) NOT NULL, + STORE_ENDPOINT VARCHAR2(255) NOT NULL, + STORE_TYPE VARCHAR2(255) NOT NULL, + FOREIGN KEY(API_ID) REFERENCES AM_API(API_ID) ON DELETE CASCADE, + PRIMARY KEY (APISTORE_ID) +) +/ + +CREATE TABLE AM_WORKFLOWS( + WF_ID INTEGER, + WF_REFERENCE VARCHAR(255) NOT NULL, + WF_TYPE VARCHAR(255) NOT NULL, + WF_STATUS VARCHAR(255) NOT NULL, + WF_CREATED_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + WF_UPDATED_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + WF_STATUS_DESC VARCHAR(1000), + TENANT_ID INTEGER, + TENANT_DOMAIN VARCHAR(255), + WF_EXTERNAL_REFERENCE VARCHAR(255) NOT NULL UNIQUE, + PRIMARY KEY (WF_ID) +) +/ + +CREATE TABLE AM_API_SCOPES ( + API_ID INTEGER NOT NULL, + SCOPE_ID INTEGER NOT NULL, + FOREIGN KEY (API_ID) REFERENCES AM_API (API_ID) ON DELETE CASCADE, + FOREIGN KEY (SCOPE_ID) REFERENCES IDN_OAUTH2_SCOPE (SCOPE_ID) ON DELETE CASCADE +) +/ +CREATE SEQUENCE AM_APP_REGISTRATION_SEQUENCE START WITH 1 INCREMENT BY 1 CACHE 20 ORDER +/ + +CREATE OR REPLACE TRIGGER AM_APP_REGISTRATION_TRIGGER + BEFORE INSERT + ON AM_APPLICATION_REGISTRATION + REFERENCING NEW AS NEW + FOR EACH ROW + BEGIN + SELECT AM_APP_REGISTRATION_SEQUENCE.nextval INTO :NEW.REG_ID FROM dual; + END; +/ + +CREATE SEQUENCE AM_WORKFLOWS_SEQUENCE START WITH 1 INCREMENT BY 1 CACHE 20 ORDER +/ + +CREATE OR REPLACE TRIGGER AM_WORKFLOWS_TRIGGER + BEFORE INSERT + ON AM_WORKFLOWS + REFERENCING NEW AS NEW + FOR EACH ROW + BEGIN + SELECT AM_WORKFLOWS_SEQUENCE.nextval INTO :NEW.WF_ID FROM dual; + END; +/ + +CREATE SEQUENCE AM_EXTERNAL_STORES_SEQUENCE START WITH 1 INCREMENT BY 1 CACHE 20 ORDER +/ + +CREATE OR REPLACE TRIGGER AM_EXTERNAL_STORES_TRIGGER + BEFORE INSERT + ON AM_EXTERNAL_STORES + REFERENCING NEW AS NEW + FOR EACH ROW + BEGIN + SELECT AM_EXTERNAL_STORES_SEQUENCE.nextval INTO :NEW.APISTORE_ID FROM dual; + END; +/ + +CREATE TABLE AM_API_DEFAULT_VERSION ( + DEFAULT_VERSION_ID NUMBER, + API_NAME VARCHAR(256) NOT NULL , + API_PROVIDER VARCHAR(256) NOT NULL , + DEFAULT_API_VERSION VARCHAR(30) , + PUBLISHED_DEFAULT_API_VERSION VARCHAR(30) , + PRIMARY KEY (DEFAULT_VERSION_ID) +) +/ +CREATE SEQUENCE AM_API_DEFAULT_VERSION_SEQ START WITH 1 INCREMENT BY 1 CACHE 20 ORDER +/ +CREATE OR REPLACE TRIGGER AM_API_DEFAULT_VERSION_TRG + BEFORE INSERT + ON AM_API_DEFAULT_VERSION + REFERENCING NEW AS NEW + FOR EACH ROW + BEGIN + SELECT AM_API_DEFAULT_VERSION_SEQ.nextval INTO :NEW.DEFAULT_VERSION_ID FROM dual; + END; +/ +CREATE INDEX IDX_SUB_APP_ID ON AM_SUBSCRIPTION (APPLICATION_ID, SUBSCRIPTION_ID) +/ + diff --git a/modules/distribution/src/repository/resources/dbscripts/apimgt/postgresql.sql b/modules/distribution/src/repository/resources/dbscripts/apimgt/postgresql.sql new file mode 100644 index 00000000..8ad4b264 --- /dev/null +++ b/modules/distribution/src/repository/resources/dbscripts/apimgt/postgresql.sql @@ -0,0 +1,908 @@ +BEGIN TRANSACTION; + +-- Start of IDN Tables -- +DROP TABLE IF EXISTS IDN_BASE_TABLE; +CREATE TABLE IDN_BASE_TABLE ( + PRODUCT_NAME VARCHAR(20), + PRIMARY KEY (PRODUCT_NAME) +); + +INSERT INTO IDN_BASE_TABLE values ('WSO2 Identity Server'); + +DROP TABLE IF EXISTS IDN_OAUTH_CONSUMER_APPS; +DROP SEQUENCE IF EXISTS IDN_OAUTH_CONSUMER_APPS_PK_SEQ; +CREATE SEQUENCE IDN_OAUTH_CONSUMER_APPS_PK_SEQ; +CREATE TABLE IDN_OAUTH_CONSUMER_APPS ( + ID INTEGER DEFAULT NEXTVAL('IDN_OAUTH_CONSUMER_APPS_PK_SEQ'), + CONSUMER_KEY VARCHAR(255), + CONSUMER_SECRET VARCHAR(512), + USERNAME VARCHAR(255), + TENANT_ID INTEGER DEFAULT 0, + USER_DOMAIN VARCHAR(50), + APP_NAME VARCHAR(255), + OAUTH_VERSION VARCHAR(128), + CALLBACK_URL VARCHAR(1024), + GRANT_TYPES VARCHAR (1024), + CONSTRAINT CONSUMER_KEY_CONSTRAINT UNIQUE (CONSUMER_KEY), + PRIMARY KEY (ID) +); + +DROP TABLE IF EXISTS IDN_OAUTH1A_REQUEST_TOKEN; +CREATE TABLE IDN_OAUTH1A_REQUEST_TOKEN ( + REQUEST_TOKEN VARCHAR(512), + REQUEST_TOKEN_SECRET VARCHAR(512), + CONSUMER_KEY_ID INTEGER, + CALLBACK_URL VARCHAR(1024), + SCOPE VARCHAR(2048), + AUTHORIZED VARCHAR(128), + OAUTH_VERIFIER VARCHAR(512), + AUTHZ_USER VARCHAR(512), + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY (REQUEST_TOKEN), + FOREIGN KEY (CONSUMER_KEY_ID) REFERENCES IDN_OAUTH_CONSUMER_APPS(ID) ON DELETE CASCADE +); + +DROP TABLE IF EXISTS IDN_OAUTH1A_ACCESS_TOKEN; +CREATE TABLE IDN_OAUTH1A_ACCESS_TOKEN ( + ACCESS_TOKEN VARCHAR(512), + ACCESS_TOKEN_SECRET VARCHAR(512), + CONSUMER_KEY_ID INTEGER, + SCOPE VARCHAR(2048), + AUTHZ_USER VARCHAR(512), + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY (ACCESS_TOKEN), + FOREIGN KEY (CONSUMER_KEY_ID) REFERENCES IDN_OAUTH_CONSUMER_APPS(ID) ON DELETE CASCADE +); + +DROP TABLE IF EXISTS IDN_OAUTH2_ACCESS_TOKEN; +CREATE TABLE IDN_OAUTH2_ACCESS_TOKEN ( + TOKEN_ID VARCHAR (255), + ACCESS_TOKEN VARCHAR(255), + REFRESH_TOKEN VARCHAR(255), + CONSUMER_KEY_ID INTEGER, + AUTHZ_USER VARCHAR (100), + TENANT_ID INTEGER, + USER_DOMAIN VARCHAR(50), + USER_TYPE VARCHAR (25), + GRANT_TYPE VARCHAR (50), + TIME_CREATED TIMESTAMP, + REFRESH_TOKEN_TIME_CREATED TIMESTAMP, + VALIDITY_PERIOD BIGINT, + REFRESH_TOKEN_VALIDITY_PERIOD BIGINT, + TOKEN_SCOPE_HASH VARCHAR(32), + TOKEN_STATE VARCHAR(25) DEFAULT 'ACTIVE', + TOKEN_STATE_ID VARCHAR (128) DEFAULT 'NONE', + PRIMARY KEY (TOKEN_ID), + FOREIGN KEY (CONSUMER_KEY_ID) REFERENCES IDN_OAUTH_CONSUMER_APPS(ID) ON DELETE CASCADE, + CONSTRAINT CON_APP_KEY UNIQUE (CONSUMER_KEY_ID,AUTHZ_USER,TOKEN_ID,USER_DOMAIN,USER_TYPE,TOKEN_SCOPE_HASH, + TOKEN_STATE,TOKEN_STATE_ID) +); + +CREATE INDEX IDX_AT_CK_AU ON IDN_OAUTH2_ACCESS_TOKEN(CONSUMER_KEY_ID, AUTHZ_USER, TOKEN_STATE, USER_TYPE); + +CREATE INDEX IDX_TC ON IDN_OAUTH2_ACCESS_TOKEN(TIME_CREATED); + +DROP TABLE IF EXISTS IDN_OAUTH2_AUTHORIZATION_CODE; +CREATE TABLE IDN_OAUTH2_AUTHORIZATION_CODE ( + AUTHORIZATION_CODE VARCHAR(512), + CONSUMER_KEY_ID INTEGER, + CALLBACK_URL VARCHAR(1024), + SCOPE VARCHAR(2048), + AUTHZ_USER VARCHAR (100), + TENANT_ID INTEGER, + USER_DOMAIN VARCHAR(50), + TIME_CREATED TIMESTAMP, + VALIDITY_PERIOD BIGINT, + STATE VARCHAR (25) DEFAULT 'ACTIVE', + TOKEN_ID VARCHAR(255), + PRIMARY KEY (AUTHORIZATION_CODE), + FOREIGN KEY (CONSUMER_KEY_ID) REFERENCES IDN_OAUTH_CONSUMER_APPS(ID) ON DELETE CASCADE +); + +DROP TABLE IF EXISTS IDN_OAUTH2_ACCESS_TOKEN_SCOPE; +CREATE TABLE IDN_OAUTH2_ACCESS_TOKEN_SCOPE ( + TOKEN_ID VARCHAR (255), + TOKEN_SCOPE VARCHAR (60), + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY (TOKEN_ID, TOKEN_SCOPE), + FOREIGN KEY (TOKEN_ID) REFERENCES IDN_OAUTH2_ACCESS_TOKEN(TOKEN_ID) ON DELETE CASCADE); + +DROP TABLE IF EXISTS IDN_OAUTH2_SCOPE; +DROP SEQUENCE IF EXISTS IDN_OAUTH2_SCOPE_PK_SEQ; +CREATE SEQUENCE IDN_OAUTH2_SCOPE_PK_SEQ; +CREATE TABLE IF NOT EXISTS IDN_OAUTH2_SCOPE ( + SCOPE_ID INTEGER DEFAULT NEXTVAL('IDN_OAUTH2_SCOPE_PK_SEQ'), + SCOPE_KEY VARCHAR(100) NOT NULL, + NAME VARCHAR(255) NULL, + DESCRIPTION VARCHAR(512) NULL, + TENANT_ID INTEGER DEFAULT 0, + ROLES VARCHAR (500) NULL, + PRIMARY KEY (SCOPE_ID) +); + +DROP TABLE IF EXISTS IDN_OAUTH2_RESOURCE_SCOPE; +CREATE TABLE IF NOT EXISTS IDN_OAUTH2_RESOURCE_SCOPE ( + RESOURCE_PATH VARCHAR(255) NOT NULL, + SCOPE_ID INTEGER NOT NULL, + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY (RESOURCE_PATH), + FOREIGN KEY (SCOPE_ID) REFERENCES IDN_OAUTH2_SCOPE (SCOPE_ID) +); + +DROP TABLE IF EXISTS IDN_SCIM_GROUP; +DROP SEQUENCE IF EXISTS IDN_SCIM_GROUP_PK_SEQ; +CREATE SEQUENCE IDN_SCIM_GROUP_PK_SEQ; +CREATE TABLE IDN_SCIM_GROUP ( + ID INTEGER DEFAULT NEXTVAL('IDN_SCIM_GROUP_PK_SEQ'), + TENANT_ID INTEGER NOT NULL, + ROLE_NAME VARCHAR(255) NOT NULL, + ATTR_NAME VARCHAR(1024) NOT NULL, + ATTR_VALUE VARCHAR(1024), + PRIMARY KEY (ID) +); + +DROP TABLE IF EXISTS IDN_OPENID_REMEMBER_ME; +CREATE TABLE IDN_OPENID_REMEMBER_ME ( + USER_NAME VARCHAR(255) NOT NULL, + TENANT_ID INTEGER DEFAULT 0, + COOKIE_VALUE VARCHAR(1024), + CREATED_TIME TIMESTAMP, + PRIMARY KEY (USER_NAME, TENANT_ID) +); + +DROP TABLE IF EXISTS IDN_OPENID_USER_RPS; +CREATE TABLE IDN_OPENID_USER_RPS ( + USER_NAME VARCHAR(255) NOT NULL, + TENANT_ID INTEGER DEFAULT 0, + RP_URL VARCHAR(255) NOT NULL, + TRUSTED_ALWAYS VARCHAR(128) DEFAULT 'FALSE', + LAST_VISIT DATE NOT NULL, + VISIT_COUNT INTEGER DEFAULT 0, + DEFAULT_PROFILE_NAME VARCHAR(255) DEFAULT 'DEFAULT', + PRIMARY KEY (USER_NAME, TENANT_ID, RP_URL) +); + +DROP TABLE IF EXISTS IDN_OPENID_ASSOCIATIONS; +CREATE TABLE IDN_OPENID_ASSOCIATIONS ( + HANDLE VARCHAR(255) NOT NULL, + ASSOC_TYPE VARCHAR(255) NOT NULL, + EXPIRE_IN TIMESTAMP NOT NULL, + MAC_KEY VARCHAR(255) NOT NULL, + ASSOC_STORE VARCHAR(128) DEFAULT 'SHARED', + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY (HANDLE) +); + +DROP TABLE IF EXISTS IDN_STS_STORE; +DROP SEQUENCE IF EXISTS IDN_STS_STORE_PK_SEQ; +CREATE SEQUENCE IDN_STS_STORE_PK_SEQ; +CREATE TABLE IDN_STS_STORE ( + ID INTEGER DEFAULT NEXTVAL('IDN_STS_STORE_PK_SEQ'), + TOKEN_ID VARCHAR(255) NOT NULL, + TOKEN_CONTENT BYTEA NOT NULL, + CREATE_DATE TIMESTAMP NOT NULL, + EXPIRE_DATE TIMESTAMP NOT NULL, + STATE INTEGER DEFAULT 0, + PRIMARY KEY (ID) +); + +DROP TABLE IF EXISTS IDN_IDENTITY_USER_DATA; +CREATE TABLE IDN_IDENTITY_USER_DATA ( + TENANT_ID INTEGER DEFAULT -1234, + USER_NAME VARCHAR(255) NOT NULL, + DATA_KEY VARCHAR(255) NOT NULL, + DATA_VALUE VARCHAR(255), + PRIMARY KEY (TENANT_ID, USER_NAME, DATA_KEY) +); + +DROP TABLE IF EXISTS IDN_IDENTITY_META_DATA; +CREATE TABLE IDN_IDENTITY_META_DATA ( + USER_NAME VARCHAR(255) NOT NULL, + TENANT_ID INTEGER DEFAULT -1234, + METADATA_TYPE VARCHAR(255) NOT NULL, + METADATA VARCHAR(255) NOT NULL, + VALID VARCHAR(255) NOT NULL, + PRIMARY KEY (TENANT_ID, USER_NAME, METADATA_TYPE,METADATA) +); + +DROP TABLE IF EXISTS IDN_THRIFT_SESSION; +CREATE TABLE IDN_THRIFT_SESSION ( + SESSION_ID VARCHAR(255) NOT NULL, + USER_NAME VARCHAR(255) NOT NULL, + CREATED_TIME VARCHAR(255) NOT NULL, + LAST_MODIFIED_TIME VARCHAR(255) NOT NULL, + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY (SESSION_ID) +); + +DROP TABLE IF EXISTS IDN_AUTH_SESSION_STORE; +CREATE TABLE IDN_AUTH_SESSION_STORE ( + SESSION_ID VARCHAR(100) NOT NULL, + SESSION_TYPE VARCHAR(100) NOT NULL, + OPERATION VARCHAR(10) NOT NULL, + SESSION_OBJECT BYTEA, + TIME_CREATED BIGINT, + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY (SESSION_ID, SESSION_TYPE, TIME_CREATED, OPERATION) + ); + +DROP TABLE IF EXISTS SP_APP; +DROP SEQUENCE IF EXISTS SP_APP_SEQ; +CREATE SEQUENCE SP_APP_SEQ; +CREATE TABLE SP_APP ( + ID INTEGER DEFAULT NEXTVAL('SP_APP_SEQ'), + TENANT_ID INTEGER NOT NULL, + APP_NAME VARCHAR (255) NOT NULL , + USER_STORE VARCHAR (255) NOT NULL, + USERNAME VARCHAR (255) NOT NULL , + DESCRIPTION VARCHAR (1024), + ROLE_CLAIM VARCHAR (512), + AUTH_TYPE VARCHAR (255) NOT NULL, + PROVISIONING_USERSTORE_DOMAIN VARCHAR (512), + IS_LOCAL_CLAIM_DIALECT CHAR(1) DEFAULT '1', + IS_SEND_LOCAL_SUBJECT_ID CHAR(1) DEFAULT '0', + IS_SEND_AUTH_LIST_OF_IDPS CHAR(1) DEFAULT '0', + IS_USE_TENANT_DOMAIN_SUBJECT CHAR(1) DEFAULT '1', + IS_USE_USER_DOMAIN_SUBJECT CHAR(1) DEFAULT '1', + SUBJECT_CLAIM_URI VARCHAR (512), + IS_SAAS_APP CHAR(1) DEFAULT '0', + IS_DUMB_MODE CHAR(1) DEFAULT '0', + PRIMARY KEY (ID)); + +ALTER TABLE SP_APP ADD CONSTRAINT APPLICATION_NAME_CONSTRAINT UNIQUE(APP_NAME, TENANT_ID); + +DROP TABLE IF EXISTS SP_METADATA; +DROP SEQUENCE IF EXISTS SP_METADATA_SEQ; +CREATE SEQUENCE SP_METADATA_SEQ; +CREATE TABLE SP_METADATA ( + ID INTEGER DEFAULT NEXTVAL('SP_METADATA_SEQ'), + SP_ID INTEGER, + NAME VARCHAR(255) NOT NULL, + VALUE VARCHAR(255) NOT NULL, + DISPLAY_NAME VARCHAR(255), + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY (ID), + CONSTRAINT SP_METADATA_CONSTRAINT UNIQUE (SP_ID, NAME), + FOREIGN KEY (SP_ID) REFERENCES SP_APP(ID) ON DELETE CASCADE); + +DROP TABLE IF EXISTS SP_INBOUND_AUTH; +DROP SEQUENCE IF EXISTS SP_INBOUND_AUTH_SEQ; +CREATE SEQUENCE SP_INBOUND_AUTH_SEQ; +CREATE TABLE SP_INBOUND_AUTH ( + ID INTEGER DEFAULT NEXTVAL('SP_INBOUND_AUTH_SEQ'), + TENANT_ID INTEGER NOT NULL, + INBOUND_AUTH_KEY VARCHAR (255) NOT NULL, + INBOUND_AUTH_TYPE VARCHAR (255) NOT NULL, + PROP_NAME VARCHAR (255), + PROP_VALUE VARCHAR (1024) , + APP_ID INTEGER NOT NULL, + PRIMARY KEY (ID)); + +ALTER TABLE SP_INBOUND_AUTH ADD CONSTRAINT APPLICATION_ID_CONSTRAINT FOREIGN KEY (APP_ID) REFERENCES SP_APP (ID) ON DELETE CASCADE; + +DROP TABLE IF EXISTS SP_AUTH_STEP; +DROP SEQUENCE IF EXISTS SP_AUTH_STEP_SEQ; +CREATE SEQUENCE SP_AUTH_STEP_SEQ; +CREATE TABLE SP_AUTH_STEP ( + ID INTEGER DEFAULT NEXTVAL('SP_AUTH_STEP_SEQ'), + TENANT_ID INTEGER NOT NULL, + STEP_ORDER INTEGER DEFAULT 1, + APP_ID INTEGER NOT NULL, + IS_SUBJECT_STEP CHAR(1) DEFAULT '0', + IS_ATTRIBUTE_STEP CHAR(1) DEFAULT '0', + PRIMARY KEY (ID)); + +ALTER TABLE SP_AUTH_STEP ADD CONSTRAINT APPLICATION_ID_CONSTRAINT_STEP FOREIGN KEY (APP_ID) REFERENCES SP_APP (ID) ON DELETE CASCADE; + +DROP TABLE IF EXISTS SP_FEDERATED_IDP; +CREATE TABLE SP_FEDERATED_IDP ( + ID INTEGER NOT NULL, + TENANT_ID INTEGER NOT NULL, + AUTHENTICATOR_ID INTEGER NOT NULL, + PRIMARY KEY (ID, AUTHENTICATOR_ID)); + +ALTER TABLE SP_FEDERATED_IDP ADD CONSTRAINT STEP_ID_CONSTRAINT FOREIGN KEY (ID) REFERENCES SP_AUTH_STEP (ID) ON DELETE CASCADE; + +DROP TABLE IF EXISTS SP_CLAIM_MAPPING; +DROP SEQUENCE IF EXISTS SP_CLAIM_MAPPING_SEQ; +CREATE SEQUENCE SP_CLAIM_MAPPING_SEQ; +CREATE TABLE SP_CLAIM_MAPPING ( + ID INTEGER DEFAULT NEXTVAL('SP_CLAIM_MAPPING_SEQ'), + TENANT_ID INTEGER NOT NULL, + IDP_CLAIM VARCHAR (512) NOT NULL , + SP_CLAIM VARCHAR (512) NOT NULL , + APP_ID INTEGER NOT NULL, + IS_REQUESTED VARCHAR(128) DEFAULT '0', + DEFAULT_VALUE VARCHAR(255), + PRIMARY KEY (ID)); + +ALTER TABLE SP_CLAIM_MAPPING ADD CONSTRAINT CLAIMID_APPID_CONSTRAINT FOREIGN KEY (APP_ID) REFERENCES SP_APP (ID) ON DELETE CASCADE; + +DROP TABLE IF EXISTS SP_ROLE_MAPPING; +DROP SEQUENCE IF EXISTS SP_ROLE_MAPPING_SEQ; +CREATE SEQUENCE SP_ROLE_MAPPING_SEQ; +CREATE TABLE SP_ROLE_MAPPING ( + ID INTEGER DEFAULT NEXTVAL('SP_ROLE_MAPPING_SEQ'), + TENANT_ID INTEGER NOT NULL, + IDP_ROLE VARCHAR (255) NOT NULL , + SP_ROLE VARCHAR (255) NOT NULL , + APP_ID INTEGER NOT NULL, + PRIMARY KEY (ID)); + +ALTER TABLE SP_ROLE_MAPPING ADD CONSTRAINT ROLEID_APPID_CONSTRAINT FOREIGN KEY (APP_ID) REFERENCES SP_APP (ID) ON DELETE CASCADE; + +DROP TABLE IF EXISTS SP_REQ_PATH_AUTH; +DROP SEQUENCE IF EXISTS SP_REQ_PATH_AUTH_SEQ; +CREATE SEQUENCE SP_REQ_PATH_AUTH_SEQ; +CREATE TABLE SP_REQ_PATH_AUTHENTICATOR ( + ID INTEGER DEFAULT NEXTVAL('SP_REQ_PATH_AUTH_SEQ'), + TENANT_ID INTEGER NOT NULL, + AUTHENTICATOR_NAME VARCHAR (255) NOT NULL , + APP_ID INTEGER NOT NULL, + PRIMARY KEY (ID)); + +ALTER TABLE SP_REQ_PATH_AUTHENTICATOR ADD CONSTRAINT REQ_AUTH_APPID_CONSTRAINT FOREIGN KEY (APP_ID) REFERENCES SP_APP (ID) ON DELETE CASCADE; + +DROP TABLE IF EXISTS SP_PROV_CONNECTOR; +DROP SEQUENCE IF EXISTS SP_PROV_CONNECTOR_SEQ; +CREATE SEQUENCE SP_PROV_CONNECTOR_SEQ; +CREATE TABLE SP_PROVISIONING_CONNECTOR ( + ID INTEGER DEFAULT NEXTVAL('SP_PROV_CONNECTOR_SEQ'), + TENANT_ID INTEGER NOT NULL, + IDP_NAME VARCHAR (255) NOT NULL , + CONNECTOR_NAME VARCHAR (255) NOT NULL , + APP_ID INTEGER NOT NULL, + IS_JIT_ENABLED CHAR(1) NOT NULL DEFAULT '0', + BLOCKING CHAR(1) NOT NULL DEFAULT '0', + PRIMARY KEY (ID)); + +ALTER TABLE SP_PROVISIONING_CONNECTOR ADD CONSTRAINT PRO_CONNECTOR_APPID_CONSTRAINT FOREIGN KEY (APP_ID) REFERENCES SP_APP (ID) ON DELETE CASCADE; + +DROP TABLE IF EXISTS IDP; +DROP SEQUENCE IF EXISTS IDP_SEQ; +CREATE SEQUENCE IDP_SEQ; +CREATE TABLE IDP ( + ID INTEGER DEFAULT NEXTVAL('IDP_SEQ'), + TENANT_ID INTEGER, + NAME VARCHAR(254) NOT NULL, + IS_ENABLED CHAR(1) NOT NULL DEFAULT '1', + IS_PRIMARY CHAR(1) NOT NULL DEFAULT '0', + HOME_REALM_ID VARCHAR(254), + IMAGE BYTEA, + CERTIFICATE BYTEA, + ALIAS VARCHAR(254), + INBOUND_PROV_ENABLED CHAR (1) NOT NULL DEFAULT '0', + INBOUND_PROV_USER_STORE_ID VARCHAR(254), + USER_CLAIM_URI VARCHAR(254), + ROLE_CLAIM_URI VARCHAR(254), + DESCRIPTION VARCHAR (1024), + DEFAULT_AUTHENTICATOR_NAME VARCHAR(254), + DEFAULT_PRO_CONNECTOR_NAME VARCHAR(254), + PROVISIONING_ROLE VARCHAR(128), + IS_FEDERATION_HUB CHAR(1) NOT NULL DEFAULT '0', + IS_LOCAL_CLAIM_DIALECT CHAR(1) NOT NULL DEFAULT '0', + DISPLAY_NAME VARCHAR(255), + PRIMARY KEY (ID), + UNIQUE (TENANT_ID, NAME)); + +INSERT INTO IDP (TENANT_ID, NAME, HOME_REALM_ID) VALUES (-1234, 'LOCAL', 'localhost'); + +DROP TABLE IF EXISTS IDP_ROLE; +DROP SEQUENCE IF EXISTS IDP_ROLE_SEQ; +CREATE SEQUENCE IDP_ROLE_SEQ; +CREATE TABLE IDP_ROLE ( + ID INTEGER DEFAULT NEXTVAL('IDP_ROLE_SEQ'), + IDP_ID INTEGER, + TENANT_ID INTEGER, + ROLE VARCHAR(254), + PRIMARY KEY (ID), + UNIQUE (IDP_ID, ROLE), + FOREIGN KEY (IDP_ID) REFERENCES IDP(ID) ON DELETE CASCADE); + +DROP TABLE IF EXISTS IDP_ROLE_MAPPING; +DROP SEQUENCE IF EXISTS IDP_ROLE_MAPPING_SEQ; +CREATE SEQUENCE IDP_ROLE_MAPPING_SEQ; +CREATE TABLE IDP_ROLE_MAPPING ( + ID INTEGER DEFAULT NEXTVAL('IDP_ROLE_MAPPING_SEQ'), + IDP_ROLE_ID INTEGER, + TENANT_ID INTEGER, + USER_STORE_ID VARCHAR (253), + LOCAL_ROLE VARCHAR(253), + PRIMARY KEY (ID), + UNIQUE (IDP_ROLE_ID, TENANT_ID, USER_STORE_ID, LOCAL_ROLE), + FOREIGN KEY (IDP_ROLE_ID) REFERENCES IDP_ROLE(ID) ON DELETE CASCADE); + +DROP TABLE IF EXISTS IDP_CLAIM; +DROP SEQUENCE IF EXISTS IDP_CLAIM_SEQ; +CREATE SEQUENCE IDP_CLAIM_SEQ; +CREATE TABLE IDP_CLAIM ( + ID INTEGER DEFAULT NEXTVAL('IDP_CLAIM_SEQ'), + IDP_ID INTEGER, + TENANT_ID INTEGER, + CLAIM VARCHAR(254), + PRIMARY KEY (ID), + UNIQUE (IDP_ID, CLAIM), + FOREIGN KEY (IDP_ID) REFERENCES IDP(ID) ON DELETE CASCADE); + +DROP TABLE IF EXISTS IDP_CLAIM_MAPPING; +DROP SEQUENCE IF EXISTS IDP_CLAIM_MAPPING_SEQ; +CREATE SEQUENCE IDP_CLAIM_MAPPING_SEQ; +CREATE TABLE IDP_CLAIM_MAPPING ( + ID INTEGER DEFAULT NEXTVAL('IDP_CLAIM_MAPPING_SEQ'), + IDP_CLAIM_ID INTEGER, + TENANT_ID INTEGER, + LOCAL_CLAIM VARCHAR(253), + DEFAULT_VALUE VARCHAR(255), + IS_REQUESTED VARCHAR(128) DEFAULT '0', + PRIMARY KEY (ID), + UNIQUE (IDP_CLAIM_ID, TENANT_ID, LOCAL_CLAIM), + FOREIGN KEY (IDP_CLAIM_ID) REFERENCES IDP_CLAIM(ID) ON DELETE CASCADE); + +DROP TABLE IF EXISTS IDP_AUTHENTICATOR; +DROP SEQUENCE IF EXISTS IDP_AUTHENTICATOR_SEQ; +CREATE SEQUENCE IDP_AUTHENTICATOR_SEQ; +CREATE TABLE IDP_AUTHENTICATOR ( + ID INTEGER DEFAULT NEXTVAL('IDP_AUTHENTICATOR_SEQ'), + TENANT_ID INTEGER, + IDP_ID INTEGER, + NAME VARCHAR(255) NOT NULL, + IS_ENABLED CHAR (1) DEFAULT '1', + DISPLAY_NAME VARCHAR(255), + PRIMARY KEY (ID), + UNIQUE (TENANT_ID, IDP_ID, NAME), + FOREIGN KEY (IDP_ID) REFERENCES IDP(ID) ON DELETE CASCADE); + +INSERT INTO IDP_AUTHENTICATOR (TENANT_ID, IDP_ID, NAME) VALUES (-1234, 1, 'samlsso'); +INSERT INTO IDP_AUTHENTICATOR (TENANT_ID, IDP_ID, NAME) VALUES (-1234, 1, 'IDPProperties'); +INSERT INTO IDP_AUTHENTICATOR (TENANT_ID, IDP_ID, NAME) VALUES (-1234, 1, 'passivests'); + + +DROP TABLE IF EXISTS IDP_METADATA; +DROP SEQUENCE IF EXISTS IDP_METADATA_SEQ; +CREATE SEQUENCE IDP_METADATA_SEQ; +CREATE TABLE IDP_METADATA ( + ID INTEGER DEFAULT NEXTVAL('IDP_METADATA_SEQ'), + IDP_ID INTEGER, + NAME VARCHAR(255) NOT NULL, + VALUE VARCHAR(255) NOT NULL, + DISPLAY_NAME VARCHAR(255), + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY (ID), + CONSTRAINT IDP_METADATA_CONSTRAINT UNIQUE (IDP_ID, NAME), + FOREIGN KEY (IDP_ID) REFERENCES IDP(ID) ON DELETE CASCADE); + +INSERT INTO IDP_METADATA (IDP_ID, NAME, VALUE, DISPLAY_NAME) VALUES (1, 'SessionIdleTimeout', '20160', 'Session Idle Timeout'); +INSERT INTO IDP_METADATA (IDP_ID, NAME, VALUE, DISPLAY_NAME) VALUES (1, 'RememberMeTimeout', '15', 'RememberMe Timeout'); + +DROP TABLE IF EXISTS IDP_AUTHENTICATOR_PROP; +DROP SEQUENCE IF EXISTS IDP_AUTHENTICATOR_PROP_SEQ; +CREATE SEQUENCE IDP_AUTHENTICATOR_PROP_SEQ; +CREATE TABLE IDP_AUTHENTICATOR_PROPERTY ( + ID INTEGER DEFAULT NEXTVAL('IDP_AUTHENTICATOR_PROP_SEQ'), + TENANT_ID INTEGER, + AUTHENTICATOR_ID INTEGER, + PROPERTY_KEY VARCHAR(255) NOT NULL, + PROPERTY_VALUE VARCHAR(2047), + IS_SECRET CHAR (1) DEFAULT '0', + PRIMARY KEY (ID), + UNIQUE (TENANT_ID, AUTHENTICATOR_ID, PROPERTY_KEY), + FOREIGN KEY (AUTHENTICATOR_ID) REFERENCES IDP_AUTHENTICATOR(ID) ON DELETE CASCADE); + +INSERT INTO IDP_AUTHENTICATOR_PROPERTY (TENANT_ID, AUTHENTICATOR_ID, PROPERTY_KEY,PROPERTY_VALUE, IS_SECRET ) VALUES (-1234, 1 , 'IdPEntityId', 'localhost', '0'); +INSERT INTO IDP_AUTHENTICATOR_PROPERTY (TENANT_ID, AUTHENTICATOR_ID, PROPERTY_KEY,PROPERTY_VALUE, IS_SECRET ) VALUES (-1234, 3 , 'IdPEntityId', 'localhost', '0'); + +DROP TABLE IF EXISTS IDP_PROV_CONFIG; +DROP SEQUENCE IF EXISTS IDP_PROV_CONFIG_SEQ; +CREATE SEQUENCE IDP_PROV_CONFIG_SEQ; +CREATE TABLE IDP_PROVISIONING_CONFIG ( + ID INTEGER DEFAULT NEXTVAL('IDP_PROV_CONFIG_SEQ'), + TENANT_ID INTEGER, + IDP_ID INTEGER, + PROVISIONING_CONNECTOR_TYPE VARCHAR(255) NOT NULL, + IS_ENABLED CHAR (1) DEFAULT '0', + IS_BLOCKING CHAR (1) DEFAULT '0', + PRIMARY KEY (ID), + UNIQUE (TENANT_ID, IDP_ID, PROVISIONING_CONNECTOR_TYPE), + FOREIGN KEY (IDP_ID) REFERENCES IDP(ID) ON DELETE CASCADE); + +DROP TABLE IF EXISTS IDP_PROV_CONFIG_PROP; +DROP SEQUENCE IF EXISTS IDP_PROV_CONFIG_PROP_SEQ; +CREATE SEQUENCE IDP_PROV_CONFIG_PROP_SEQ; +CREATE TABLE IDP_PROV_CONFIG_PROPERTY ( + ID INTEGER DEFAULT NEXTVAL('IDP_PROV_CONFIG_PROP_SEQ'), + TENANT_ID INTEGER, + PROVISIONING_CONFIG_ID INTEGER, + PROPERTY_KEY VARCHAR(255) NOT NULL, + PROPERTY_VALUE VARCHAR(2048), + PROPERTY_BLOB_VALUE BYTEA, + PROPERTY_TYPE CHAR(32) NOT NULL, + IS_SECRET CHAR (1) DEFAULT '0', + PRIMARY KEY (ID), + UNIQUE (TENANT_ID, PROVISIONING_CONFIG_ID, PROPERTY_KEY), + FOREIGN KEY (PROVISIONING_CONFIG_ID) REFERENCES IDP_PROVISIONING_CONFIG(ID) ON DELETE CASCADE); + +DROP TABLE IF EXISTS IDP_PROV_ENTITY; +DROP SEQUENCE IF EXISTS IDP_PROV_ENTITY_SEQ; +CREATE SEQUENCE IDP_PROV_ENTITY_SEQ; +CREATE TABLE IDP_PROVISIONING_ENTITY ( + ID INTEGER DEFAULT NEXTVAL('IDP_PROV_ENTITY_SEQ'), + PROVISIONING_CONFIG_ID INTEGER, + ENTITY_TYPE VARCHAR(255) NOT NULL, + ENTITY_LOCAL_USERSTORE VARCHAR(255) NOT NULL, + ENTITY_NAME VARCHAR(255) NOT NULL, + ENTITY_VALUE VARCHAR(255), + TENANT_ID INTEGER, + ENTITY_LOCAL_ID VARCHAR(255), + PRIMARY KEY (ID), + UNIQUE (ENTITY_TYPE, TENANT_ID, ENTITY_LOCAL_USERSTORE, ENTITY_NAME, PROVISIONING_CONFIG_ID), + UNIQUE (PROVISIONING_CONFIG_ID, ENTITY_TYPE, ENTITY_VALUE), + FOREIGN KEY (PROVISIONING_CONFIG_ID) REFERENCES IDP_PROVISIONING_CONFIG(ID) ON DELETE CASCADE); + +DROP TABLE IF EXISTS IDP_LOCAL_CLAIM; +DROP SEQUENCE IF EXISTS IDP_LOCAL_CLAIM_SEQ; +CREATE SEQUENCE IDP_LOCAL_CLAIM_SEQ; +CREATE TABLE IF NOT EXISTS IDP_LOCAL_CLAIM( + ID INTEGER DEFAULT NEXTVAL('IDP_LOCAL_CLAIM_SEQ'), + TENANT_ID INTEGER, + IDP_ID INTEGER, + CLAIM_URI VARCHAR(255) NOT NULL, + DEFAULT_VALUE VARCHAR(255), + IS_REQUESTED VARCHAR(128) DEFAULT '0', + PRIMARY KEY (ID), + UNIQUE (TENANT_ID, IDP_ID, CLAIM_URI), + FOREIGN KEY (IDP_ID) REFERENCES IDP(ID) ON DELETE CASCADE); + +DROP TABLE IF EXISTS IDN_ASSOCIATED_ID; +DROP SEQUENCE IF EXISTS IDN_ASSOCIATED_ID_SEQ; +CREATE SEQUENCE IDN_ASSOCIATED_ID_SEQ; +CREATE TABLE IDN_ASSOCIATED_ID ( + ID INTEGER DEFAULT NEXTVAL('IDN_ASSOCIATED_ID_SEQ'), + IDP_USER_ID VARCHAR(255) NOT NULL, + TENANT_ID INTEGER DEFAULT -1234, + IDP_ID INTEGER NOT NULL, + DOMAIN_NAME VARCHAR(255) NOT NULL, + USER_NAME VARCHAR(255) NOT NULL, + PRIMARY KEY (ID), + UNIQUE(IDP_USER_ID, TENANT_ID, IDP_ID), + FOREIGN KEY (IDP_ID) REFERENCES IDP(ID) ON DELETE CASCADE +); + +DROP TABLE IF EXISTS IDN_USER_ACCOUNT_ASSOCIATION; +CREATE TABLE IDN_USER_ACCOUNT_ASSOCIATION ( + ASSOCIATION_KEY VARCHAR(255) NOT NULL, + TENANT_ID INTEGER, + DOMAIN_NAME VARCHAR(255) NOT NULL, + USER_NAME VARCHAR(255) NOT NULL, + PRIMARY KEY (TENANT_ID, DOMAIN_NAME, USER_NAME)); + +DROP TABLE IF EXISTS FIDO_DEVICE_STORE; +CREATE TABLE FIDO_DEVICE_STORE ( + TENANT_ID INTEGER, + DOMAIN_NAME VARCHAR(255) NOT NULL, + USER_NAME VARCHAR(45) NOT NULL, + TIME_REGISTERED TIMESTAMP, + KEY_HANDLE VARCHAR(200) NOT NULL, + DEVICE_DATA VARCHAR(2048) NOT NULL, + PRIMARY KEY (TENANT_ID, DOMAIN_NAME, USER_NAME, KEY_HANDLE)); + +DROP TABLE IF EXISTS WF_REQUEST; +CREATE TABLE WF_REQUEST ( + UUID VARCHAR (45), + CREATED_BY VARCHAR (255), + TENANT_ID INTEGER DEFAULT -1, + OPERATION_TYPE VARCHAR (50), + CREATED_AT TIMESTAMP, + UPDATED_AT TIMESTAMP, + STATUS VARCHAR (30), + REQUEST BYTEA, + PRIMARY KEY (UUID) +); + +DROP TABLE IF EXISTS WF_BPS_PROFILE; +CREATE TABLE WF_BPS_PROFILE ( + PROFILE_NAME VARCHAR(45), + HOST_URL_MANAGER VARCHAR(45), + HOST_URL_WORKER VARCHAR(45), + USERNAME VARCHAR(45), + PASSWORD VARCHAR(255), + CALLBACK_HOST VARCHAR (45), + CALLBACK_USERNAME VARCHAR (45), + CALLBACK_PASSWORD VARCHAR (255), + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY (PROFILE_NAME, TENANT_ID) +); + +DROP TABLE IF EXISTS WF_WORKFLOW; +CREATE TABLE WF_WORKFLOW( + ID VARCHAR (45), + WF_NAME VARCHAR (45), + DESCRIPTION VARCHAR (255), + TEMPLATE_ID VARCHAR (45), + IMPL_ID VARCHAR (45), + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY (ID) +); + +DROP TABLE IF EXISTS WF_WORKFLOW_ASSOCIATION; +DROP SEQUENCE IF EXISTS WF_WORKFLOW_ASSOCIATION_PK_SEQ; +CREATE SEQUENCE WF_WORKFLOW_ASSOCIATION_PK_SEQ; +CREATE TABLE WF_WORKFLOW_ASSOCIATION( + ID INTEGER DEFAULT NEXTVAL('WF_WORKFLOW_ASSOCIATION_PK_SEQ'), + ASSOC_NAME VARCHAR (45), + EVENT_ID VARCHAR(45), + ASSOC_CONDITION VARCHAR (2000), + WORKFLOW_ID VARCHAR (45), + IS_ENABLED CHAR (1) DEFAULT '1', + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY(ID), + FOREIGN KEY (WORKFLOW_ID) REFERENCES WF_WORKFLOW(ID)ON DELETE CASCADE +); + +DROP TABLE IF EXISTS WF_WORKFLOW_CONFIG_PARAM; +CREATE TABLE WF_WORKFLOW_CONFIG_PARAM( + WORKFLOW_ID VARCHAR (45), + PARAM_NAME VARCHAR (45), + PARAM_VALUE VARCHAR (1000), + PARAM_QNAME VARCHAR (45), + PARAM_HOLDER VARCHAR (45), + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY (WORKFLOW_ID, PARAM_NAME, PARAM_QNAME, PARAM_HOLDER), + FOREIGN KEY (WORKFLOW_ID) REFERENCES WF_WORKFLOW(ID)ON DELETE CASCADE +); + +DROP TABLE IF EXISTS WF_REQUEST_ENTITY_RELATIONSHIP; +CREATE TABLE WF_REQUEST_ENTITY_RELATIONSHIP( + REQUEST_ID VARCHAR (45), + ENTITY_NAME VARCHAR (255), + ENTITY_TYPE VARCHAR (50), + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY(REQUEST_ID, ENTITY_NAME, ENTITY_TYPE, TENANT_ID), + FOREIGN KEY (REQUEST_ID) REFERENCES WF_REQUEST(UUID)ON DELETE CASCADE +); + +DROP TABLE IF EXISTS WF_WORKFLOW_REQUEST_RELATION; +CREATE TABLE WF_WORKFLOW_REQUEST_RELATION( + RELATIONSHIP_ID VARCHAR (45), + WORKFLOW_ID VARCHAR (45), + REQUEST_ID VARCHAR (45), + UPDATED_AT TIMESTAMP, + STATUS VARCHAR (30), + TENANT_ID INTEGER DEFAULT -1, + PRIMARY KEY (RELATIONSHIP_ID), + FOREIGN KEY (WORKFLOW_ID) REFERENCES WF_WORKFLOW(ID)ON DELETE CASCADE, + FOREIGN KEY (REQUEST_ID) REFERENCES WF_REQUEST(UUID)ON DELETE CASCADE +); + +-- End of IDENTITY Tables-- + +CREATE SEQUENCE AM_SUBSCRIBER_SEQUENCE START WITH 1 INCREMENT BY 1; +CREATE TABLE AM_SUBSCRIBER ( + SUBSCRIBER_ID INTEGER DEFAULT nextval('am_subscriber_sequence'), + USER_ID VARCHAR(50) NOT NULL, + TENANT_ID INTEGER NOT NULL, + EMAIL_ADDRESS VARCHAR(256) NULL, + DATE_SUBSCRIBED DATE NOT NULL, + CREATED_BY VARCHAR(100), + CREATED_TIME DATE, + UPDATED_BY VARCHAR(100), + UPDATED_TIME DATE, + PRIMARY KEY (SUBSCRIBER_ID), + UNIQUE (TENANT_ID,USER_ID) +) +; + +CREATE SEQUENCE AM_APPLICATION_SEQUENCE START WITH 1 INCREMENT BY 1 ; +CREATE TABLE AM_APPLICATION ( + APPLICATION_ID INTEGER DEFAULT nextval('am_application_sequence'), + NAME VARCHAR(100), + SUBSCRIBER_ID INTEGER, + APPLICATION_TIER VARCHAR(50) DEFAULT 'Unlimited', + CALLBACK_URL VARCHAR(512), + DESCRIPTION VARCHAR(512), + APPLICATION_STATUS VARCHAR(50) DEFAULT 'APPROVED', + CREATED_BY VARCHAR(100), + CREATED_TIME DATE, + UPDATED_BY VARCHAR(100), + UPDATED_TIME DATE, + FOREIGN KEY(SUBSCRIBER_ID) REFERENCES AM_SUBSCRIBER(SUBSCRIBER_ID) ON UPDATE CASCADE ON DELETE RESTRICT, + PRIMARY KEY(APPLICATION_ID), + UNIQUE (NAME,SUBSCRIBER_ID) +) +; + +CREATE SEQUENCE AM_API_SEQUENCE START WITH 1 INCREMENT BY 1; +CREATE TABLE AM_API ( + API_ID INTEGER DEFAULT nextval('am_api_sequence'), + API_PROVIDER VARCHAR(256), + API_NAME VARCHAR(256), + API_VERSION VARCHAR(30), + CONTEXT VARCHAR(256), + CONTEXT_TEMPLATE VARCHAR(256), + CREATED_BY VARCHAR(100), + CREATED_TIME DATE, + UPDATED_BY VARCHAR(100), + UPDATED_TIME DATE, + PRIMARY KEY(API_ID), + UNIQUE (API_PROVIDER,API_NAME,API_VERSION) +) +; + +CREATE SEQUENCE AM_API_URL_MAPPING_SEQUENCE START WITH 1 INCREMENT BY 1; +CREATE TABLE AM_API_URL_MAPPING ( + URL_MAPPING_ID INTEGER DEFAULT nextval('am_api_url_mapping_sequence'), + API_ID INTEGER NOT NULL, + HTTP_METHOD VARCHAR(20) NULL, + AUTH_SCHEME VARCHAR(50) NULL, + URL_PATTERN VARCHAR(512) NULL, + THROTTLING_TIER varchar(512) DEFAULT NULL, + MEDIATION_SCRIPT BYTEA, + PRIMARY KEY(URL_MAPPING_ID) +) +; + +CREATE SEQUENCE AM_SUBSCRIPTION_SEQUENCE START WITH 1 INCREMENT BY 1; +CREATE TABLE AM_SUBSCRIPTION ( + SUBSCRIPTION_ID INTEGER DEFAULT nextval('am_subscription_sequence'), + TIER_ID VARCHAR(50), + API_ID INTEGER, + LAST_ACCESSED DATE NULL, + APPLICATION_ID INTEGER, + SUB_STATUS VARCHAR(50), + SUBS_CREATE_STATE VARCHAR(50) DEFAULT 'SUBSCRIBE', + CREATED_BY VARCHAR(100), + CREATED_TIME DATE, + UPDATED_BY VARCHAR(100), + UPDATED_TIME DATE, + FOREIGN KEY(APPLICATION_ID) REFERENCES AM_APPLICATION(APPLICATION_ID) ON UPDATE CASCADE ON DELETE RESTRICT, + FOREIGN KEY(API_ID) REFERENCES AM_API(API_ID) ON UPDATE CASCADE ON DELETE RESTRICT, + PRIMARY KEY (SUBSCRIPTION_ID) +) +; + +CREATE TABLE AM_SUBSCRIPTION_KEY_MAPPING ( + SUBSCRIPTION_ID INTEGER, + ACCESS_TOKEN VARCHAR(512), + KEY_TYPE VARCHAR(512) NOT NULL, + FOREIGN KEY(SUBSCRIPTION_ID) REFERENCES AM_SUBSCRIPTION(SUBSCRIPTION_ID) ON UPDATE CASCADE ON DELETE RESTRICT, + PRIMARY KEY(SUBSCRIPTION_ID,ACCESS_TOKEN) +) +; + +CREATE TABLE AM_APPLICATION_KEY_MAPPING ( + APPLICATION_ID INTEGER, + CONSUMER_KEY VARCHAR(512), + KEY_TYPE VARCHAR(512) NOT NULL, + STATE VARCHAR(30), + FOREIGN KEY(APPLICATION_ID) REFERENCES AM_APPLICATION(APPLICATION_ID) ON UPDATE CASCADE ON DELETE RESTRICT, + PRIMARY KEY(APPLICATION_ID,KEY_TYPE) +) +; + +CREATE SEQUENCE AM_APPLICATION_REGISTRATION_SEQUENCE START WITH 1 INCREMENT BY 1; +CREATE TABLE IF NOT EXISTS AM_APPLICATION_REGISTRATION ( + REG_ID INTEGER DEFAULT nextval('am_application_registration_sequence'), + SUBSCRIBER_ID INT, + WF_REF VARCHAR(255) NOT NULL, + APP_ID INT, + TOKEN_TYPE VARCHAR(30), + TOKEN_SCOPE VARCHAR(256) DEFAULT 'default', + ALLOWED_DOMAINS VARCHAR(256), + VALIDITY_PERIOD BIGINT, + UNIQUE (SUBSCRIBER_ID,APP_ID,TOKEN_TYPE), + FOREIGN KEY(SUBSCRIBER_ID) REFERENCES AM_SUBSCRIBER(SUBSCRIBER_ID) ON UPDATE CASCADE ON DELETE RESTRICT, + FOREIGN KEY(APP_ID) REFERENCES AM_APPLICATION(APPLICATION_ID) ON UPDATE CASCADE ON DELETE RESTRICT, + PRIMARY KEY (REG_ID) +) +; + + + +CREATE SEQUENCE AM_API_LC_EVENT_SEQUENCE START WITH 1 INCREMENT BY 1; +CREATE TABLE AM_API_LC_EVENT ( + EVENT_ID INTEGER DEFAULT nextval('am_api_lc_event_sequence'), + API_ID INTEGER NOT NULL, + PREVIOUS_STATE VARCHAR(50), + NEW_STATE VARCHAR(50) NOT NULL, + USER_ID VARCHAR(50) NOT NULL, + TENANT_ID INTEGER NOT NULL, + EVENT_DATE DATE NOT NULL, + FOREIGN KEY(API_ID) REFERENCES AM_API(API_ID) ON UPDATE CASCADE ON DELETE RESTRICT, + PRIMARY KEY (EVENT_ID) +) +; + +CREATE TABLE AM_APP_KEY_DOMAIN_MAPPING ( + CONSUMER_KEY VARCHAR(255), + AUTHZ_DOMAIN VARCHAR(255) DEFAULT 'ALL', + PRIMARY KEY (CONSUMER_KEY,AUTHZ_DOMAIN) +) +; + +CREATE SEQUENCE AM_API_COMMENTS_SEQUENCE START WITH 1 INCREMENT BY 1; +CREATE TABLE AM_API_COMMENTS ( + COMMENT_ID INTEGER DEFAULT nextval('am_api_comments_sequence'), + COMMENT_TEXT VARCHAR(512), + COMMENTED_USER VARCHAR(255), + DATE_COMMENTED DATE NOT NULL, + API_ID INTEGER NOT NULL, + FOREIGN KEY(API_ID) REFERENCES AM_API(API_ID) ON UPDATE CASCADE ON DELETE RESTRICT, + PRIMARY KEY (COMMENT_ID) +) +; + +CREATE SEQUENCE AM_WORKFLOWS_SEQUENCE START WITH 1 INCREMENT BY 1; +CREATE TABLE AM_WORKFLOWS( + WF_ID INTEGER DEFAULT nextval('am_workflows_sequence'), + WF_REFERENCE VARCHAR(255) NOT NULL, + WF_TYPE VARCHAR(255) NOT NULL, + WF_STATUS VARCHAR(255) NOT NULL, + WF_CREATED_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + WF_UPDATED_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP , + WF_STATUS_DESC VARCHAR(1000), + TENANT_ID INTEGER, + TENANT_DOMAIN VARCHAR(255), + WF_EXTERNAL_REFERENCE VARCHAR(255) NOT NULL, + PRIMARY KEY (WF_ID), + UNIQUE (WF_EXTERNAL_REFERENCE) +) +; + +CREATE SEQUENCE AM_API_RATINGS_SEQUENCE START WITH 1 INCREMENT BY 1; +CREATE TABLE AM_API_RATINGS ( + RATING_ID INTEGER DEFAULT nextval('am_api_ratings_sequence'), + API_ID INTEGER, + RATING INTEGER, + SUBSCRIBER_ID INTEGER, + FOREIGN KEY(API_ID) REFERENCES AM_API(API_ID) ON UPDATE CASCADE ON DELETE RESTRICT, + FOREIGN KEY(SUBSCRIBER_ID) REFERENCES AM_SUBSCRIBER(SUBSCRIBER_ID) ON UPDATE CASCADE ON DELETE RESTRICT, + PRIMARY KEY (RATING_ID) +) +; + +CREATE SEQUENCE AM_TIER_PERMISSIONS_SEQUENCE START WITH 1 INCREMENT BY 1; +CREATE TABLE AM_TIER_PERMISSIONS ( + TIER_PERMISSIONS_ID INTEGER DEFAULT nextval('am_tier_permissions_sequence'), + TIER VARCHAR(50) NOT NULL, + PERMISSIONS_TYPE VARCHAR(50) NOT NULL, + ROLES VARCHAR(512) NOT NULL, + TENANT_ID INTEGER NOT NULL, + PRIMARY KEY(TIER_PERMISSIONS_ID) +); + +CREATE SEQUENCE AM_EXTERNAL_STORES_SEQUENCE START WITH 1 INCREMENT BY 1; +CREATE TABLE AM_EXTERNAL_STORES ( + APISTORE_ID INTEGER DEFAULT nextval('am_external_stores_sequence'), + API_ID INTEGER, + STORE_ID VARCHAR(255) NOT NULL, + STORE_DISPLAY_NAME VARCHAR(255) NOT NULL, + STORE_ENDPOINT VARCHAR(255) NOT NULL, + STORE_TYPE VARCHAR(255) NOT NULL, + FOREIGN KEY(API_ID) REFERENCES AM_API(API_ID) ON UPDATE CASCADE ON DELETE RESTRICT, + PRIMARY KEY (APISTORE_ID) +) +; + +DROP TABLE IF EXISTS AM_API_SCOPES; +CREATE TABLE IF NOT EXISTS AM_API_SCOPES ( + API_ID INTEGER NOT NULL, + SCOPE_ID INTEGER NOT NULL, + FOREIGN KEY (API_ID) REFERENCES AM_API (API_ID) ON DELETE CASCADE ON UPDATE CASCADE, + FOREIGN KEY (SCOPE_ID) REFERENCES IDN_OAUTH2_SCOPE (SCOPE_ID) ON DELETE CASCADE ON UPDATE CASCADE +); + +DROP TABLE IF EXISTS AM_API_DEFAULT_VERSION; +DROP SEQUENCE IF EXISTS AM_API_DEFAULT_VERSION_PK_SEQ; +CREATE SEQUENCE AM_API_DEFAULT_VERSION_PK_SEQ; +CREATE TABLE AM_API_DEFAULT_VERSION ( + DEFAULT_VERSION_ID INTEGER DEFAULT NEXTVAL('am_api_default_version_pk_seq'), + API_NAME VARCHAR(256) NOT NULL , + API_PROVIDER VARCHAR(256) NOT NULL , + DEFAULT_API_VERSION VARCHAR(30) , + PUBLISHED_DEFAULT_API_VERSION VARCHAR(30) , + PRIMARY KEY (DEFAULT_VERSION_ID) +); + + +CREATE INDEX IDX_SUB_APP_ID ON AM_SUBSCRIPTION (APPLICATION_ID, SUBSCRIPTION_ID) +; +commit; diff --git a/pom.xml b/pom.xml index 9d77eb37..2fe1efa5 100644 --- a/pom.xml +++ b/pom.xml @@ -1034,7 +1034,7 @@ 4.6.0 - 5.0.2 + 5.0.3 4.5.0 From 0076709626ed412eb72fa7cd2b06a6764798f763 Mon Sep 17 00:00:00 2001 From: Menaka Madushanka Date: Thu, 10 Dec 2015 16:54:23 +0530 Subject: [PATCH 05/24] Android sense feature added. --- modules/p2-profile-gen/pom.xml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/p2-profile-gen/pom.xml b/modules/p2-profile-gen/pom.xml index 102fdaa8..04871576 100644 --- a/modules/p2-profile-gen/pom.xml +++ b/modules/p2-profile-gen/pom.xml @@ -171,6 +171,9 @@ org.wso2.carbon.devicemgt-plugins:org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature:${carbon.mobile.device.mgt.version} + + org.wso2.carbon.devicemgt-plugins:org.wso2.carbon.device.mgt.iot.androidsense.feature:${carbon.mobile.device.mgt.version} + org.wso2.carbon.devicemgt-plugins:org.wso2.carbon.device.mgt.iot.digitaldisplay.feature:${carbon.mobile.device.mgt.version} @@ -877,6 +880,10 @@ org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature.group ${carbon.mobile.device.mgt.version} + + org.wso2.carbon.device.mgt.iot.androidsense.feature.group + ${carbon.mobile.device.mgt.version} + org.wso2.carbon.device.mgt.iot.digitaldisplay.feature.group ${carbon.mobile.device.mgt.version} From c08aa706e614fda7fa6a96af75dceaaea830bc0e Mon Sep 17 00:00:00 2001 From: charithag Date: Thu, 10 Dec 2015 18:56:20 +0530 Subject: [PATCH 06/24] Removed oltu patch since it is included in identity 5.0.3 --- modules/distribution/src/assembly/bin.xml | 16 ++++++++-------- .../repository/patches/oltu-1.0.0.wso2v2.jar | Bin 93827 -> 0 bytes 2 files changed, 8 insertions(+), 8 deletions(-) delete mode 100644 modules/distribution/src/repository/patches/oltu-1.0.0.wso2v2.jar diff --git a/modules/distribution/src/assembly/bin.xml b/modules/distribution/src/assembly/bin.xml index 60ca15e1..8a859d0a 100644 --- a/modules/distribution/src/assembly/bin.xml +++ b/modules/distribution/src/assembly/bin.xml @@ -1174,14 +1174,14 @@ 644 - - - src/repository/patches/oltu-1.0.0.wso2v2.jar - - - ${pom.artifactId}-${pom.version}/repository/components/patches/patch1000 - - + + + + + + + + diff --git a/modules/distribution/src/repository/patches/oltu-1.0.0.wso2v2.jar b/modules/distribution/src/repository/patches/oltu-1.0.0.wso2v2.jar deleted file mode 100644 index 56f7b53abbd5202e6fcac7a5394e173aed5921df..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 93827 zcmb@t1yE&6mNksKyHmKkySux)ySo(bRyY*y?(XjH?(R@fSOGuvx<~rW%=@}${u=>7 z1UEC!$+PxaYwz4gUJ4il1pop90wCGYUkuMd@S&WF@ zMBm2%06Nu1ZP)1$IvAS0Awqc5iO`Xc_PrgYG3SZNp=2_r{h&_$dQ%nMddP*yn9gJ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X&%FkKbN~pAgt~z}0@Yj{9CuW3yPudK7R?{rjra37ROB82 zp#x5`buc5)!2vWN0f@}~L#WE!G?^lpY8#mTIMi`FMW?@{{y4DG92f_o~`?}_qr zjCL4v13I(;~LtjOOF2!75G`59ofjIoI_;ZqsU?HC!1~sA0m%XtzM~pv%wnqVU9syt54P^V%XuoG-$Y(e~+fT_}#G-U8 z*>*o6pAQ2~qN6wVpwcd9Ms24epTPm87Nev6?cJx*)~35(PA$X~EnB zb!*i8*PW2#C$=MzH@=sEG`h3cdqD1R;Kg<#@}A|25TZE#9*B@xH43j`wl@!G!n?YE zH?-sC7U{^!AUa3neWjtj`*}jtB>r)ObYu*o13})B8JYz$kf4UyjET+OWB2g`Y8oZ5 z5AlYFVOB( zif=c Date: Thu, 10 Dec 2015 20:24:03 +0530 Subject: [PATCH 07/24] Add carbonapps to deployment --- modules/distribution/src/assembly/bin.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/distribution/src/assembly/bin.xml b/modules/distribution/src/assembly/bin.xml index 8a859d0a..d29edf92 100644 --- a/modules/distribution/src/assembly/bin.xml +++ b/modules/distribution/src/assembly/bin.xml @@ -331,6 +331,11 @@ */** + + src/statistics/carbonapps/target + ${pom.artifactId}-${pom.version}/repository/deployment/server/carbonapps + + ../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/resources From 47c4c170120c0a5786699824072e06fbeeebda43 Mon Sep 17 00:00:00 2001 From: menaka Date: Thu, 10 Dec 2015 21:10:18 +0530 Subject: [PATCH 08/24] Android sense db added --- modules/distribution/pom.xml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/modules/distribution/pom.xml b/modules/distribution/pom.xml index cee5578e..e489627c 100644 --- a/modules/distribution/pom.xml +++ b/modules/distribution/pom.xml @@ -259,6 +259,39 @@ + + + + create-android-sense-plugin-mgt-schema + package + + run + + + + + + + + + + + + + + + + + + + + + From 4b8662f58f2440fa55cd8c8360f3049abaeb8e22 Mon Sep 17 00:00:00 2001 From: charithag Date: Fri, 11 Dec 2015 08:52:51 +0530 Subject: [PATCH 09/24] Add required changes for android sense --- modules/distribution/pom.xml | 31 +++++++++++++++++++++++ modules/distribution/src/assembly/bin.xml | 10 ++++++++ 2 files changed, 41 insertions(+) diff --git a/modules/distribution/pom.xml b/modules/distribution/pom.xml index cee5578e..b17357ee 100644 --- a/modules/distribution/pom.xml +++ b/modules/distribution/pom.xml @@ -259,6 +259,37 @@ + + + create-android-sense-plugin-mgt-schema + package + + run + + + + + + + + + + + + + + + + + + + + diff --git a/modules/distribution/src/assembly/bin.xml b/modules/distribution/src/assembly/bin.xml index d29edf92..d4523b77 100644 --- a/modules/distribution/src/assembly/bin.xml +++ b/modules/distribution/src/assembly/bin.xml @@ -239,6 +239,16 @@ **/cdm-datasources.xml + + + ../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/datasources/devicemgt + + ${pom.artifactId}-${pom.version}/repository/conf/datasources + + + */** + + src/repository/resources ${pom.artifactId}-${pom.version}/repository/resources From 75d4344f6cad1c0d59409a2270d1538af8f0c787 Mon Sep 17 00:00:00 2001 From: menaka Date: Fri, 11 Dec 2015 11:02:20 +0530 Subject: [PATCH 10/24] DB schema for android sense and script change --- modules/distribution/pom.xml | 2 +- .../conf/datasources/master-datasources.xml | 21 +++++++++++++++++++ .../org_wso2_iot_devices_accelerometer.xml | 2 +- 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/modules/distribution/pom.xml b/modules/distribution/pom.xml index e489627c..b4ee390e 100644 --- a/modules/distribution/pom.xml +++ b/modules/distribution/pom.xml @@ -285,7 +285,7 @@ + file="${basedir}/../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/dbscripts/cdm/plugins/androidsense/h2.sql"/> diff --git a/modules/distribution/src/repository/conf/datasources/master-datasources.xml b/modules/distribution/src/repository/conf/datasources/master-datasources.xml index 1627f55f..32840e8e 100755 --- a/modules/distribution/src/repository/conf/datasources/master-datasources.xml +++ b/modules/distribution/src/repository/conf/datasources/master-datasources.xml @@ -217,5 +217,26 @@ + + AndroidSenseDM_DB + The datasource used for the Android-Sense database + + jdbc/AndroidSenseDM_DB + + + + jdbc:h2:repository/database/AndroidSenseDM_DB;DB_CLOSE_ON_EXIT=FALSE + + wso2carbon + wso2carbon + org.h2.Driver + 50 + 60000 + true + SELECT 1 + 30000 + + + diff --git a/modules/distribution/src/statistics/carbonapps/Accelerometer/Eventstore_accelerometer_1.0.0/org_wso2_iot_devices_accelerometer.xml b/modules/distribution/src/statistics/carbonapps/Accelerometer/Eventstore_accelerometer_1.0.0/org_wso2_iot_devices_accelerometer.xml index 77bec2a3..3312516e 100644 --- a/modules/distribution/src/statistics/carbonapps/Accelerometer/Eventstore_accelerometer_1.0.0/org_wso2_iot_devices_accelerometer.xml +++ b/modules/distribution/src/statistics/carbonapps/Accelerometer/Eventstore_accelerometer_1.0.0/org_wso2_iot_devices_accelerometer.xml @@ -34,7 +34,7 @@ LONG - battery + accelerometer false false false From 4dcd064f8bccc16df9709904681848ed71b139a4 Mon Sep 17 00:00:00 2001 From: charithag Date: Fri, 11 Dec 2015 11:06:37 +0530 Subject: [PATCH 11/24] Use custom carbon xml and Add DAS portal jaggery app --- modules/distribution/src/assembly/bin.xml | 15 +- .../src/repository/conf/carbon.xml | 687 ++++++++++++++++++ modules/p2-profile-gen/pom.xml | 15 +- pom.xml | 1 + 4 files changed, 716 insertions(+), 2 deletions(-) create mode 100644 modules/distribution/src/repository/conf/carbon.xml diff --git a/modules/distribution/src/assembly/bin.xml b/modules/distribution/src/assembly/bin.xml index d4523b77..f00540d0 100644 --- a/modules/distribution/src/assembly/bin.xml +++ b/modules/distribution/src/assembly/bin.xml @@ -517,6 +517,19 @@ **/analytics-eventsink-config.xml + + + + + ../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/deployment/server/jaggeryapps/portal + + + ${pom.artifactId}-${pom.version}/repository/deployment/server/jaggeryapps/portal + + + **/* + + @@ -905,7 +918,7 @@ 644 - target/wso2carbon-core-${carbon.kernel.version}/repository/conf/carbon.xml + src/repository/conf/carbon.xml ${pom.artifactId}-${pom.version}/repository/conf/ true diff --git a/modules/distribution/src/repository/conf/carbon.xml b/modules/distribution/src/repository/conf/carbon.xml new file mode 100644 index 00000000..44187b0c --- /dev/null +++ b/modules/distribution/src/repository/conf/carbon.xml @@ -0,0 +1,687 @@ + + + + + + + + + ${product.name} + + + ${product.key} + + + ${product.version} + + + + + + + + + local:/${carbon.context}/services/ + + + + + + + ${default.server.role} + ${das.server.role} + ${cep.server.role} + + + + + + + org.wso2.carbon + + + / + + + + + + + + + 15 + + + + + + + + + 0 + + + + + 9999 + + 11111 + + + + + + 10389 + + 8000 + + + + + + 10500 + + + + + + + org.wso2.carbon.tomcat.jndi.CarbonJavaURLContextFactory + + + + + + + + + java + + + + + + + + + + false + + + false + + + 600 + + + + false + + + + + + + + 30 + + + + + + + + + 15 + + + + + + ${carbon.home}/repository/deployment/server/ + + + 15 + + + ${carbon.home}/repository/conf/axis2/axis2.xml + + + 30000 + + + ${carbon.home}/repository/deployment/client/ + + ${carbon.home}/repository/conf/axis2/axis2_client.xml + + true + + + + + + + + + + admin + Default Administrator Role + + + user + Default User Role + + + + + + + + + + + + ${carbon.home}/repository/resources/security/wso2carbon.jks + + JKS + + wso2carbon + + wso2carbon + + wso2carbon + + + + + + ${carbon.home}/repository/resources/security/client-truststore.jks + + JKS + + wso2carbon + + + + + + + + + + + + + + + + + + + UserManager + + + false + + + + + + + + + + ${carbon.home}/tmp/work + + + + + + true + + + 10 + + + 30 + + + + + + 100 + + + + keystore + certificate + * + + org.wso2.carbon.ui.transports.fileupload.AnyFileUploadExecutor + + + + + jarZip + + org.wso2.carbon.ui.transports.fileupload.JarZipUploadExecutor + + + + dbs + + org.wso2.carbon.ui.transports.fileupload.DBSFileUploadExecutor + + + + tools + + org.wso2.carbon.ui.transports.fileupload.ToolsFileUploadExecutor + + + + toolsAny + + org.wso2.carbon.ui.transports.fileupload.ToolsAnyFileUploadExecutor + + + + + + + info + org.wso2.carbon.core.transports.util.InfoProcessor + + + wsdl + org.wso2.carbon.core.transports.util.Wsdl11Processor + + + wsdl2 + org.wso2.carbon.core.transports.util.Wsdl20Processor + + + xsd + org.wso2.carbon.core.transports.util.XsdProcessor + + + + + + false + false + true + svn + http://svnrepo.example.com/repos/ + username + password + true + + + + + + + + + + + + + + + ${require.carbon.servlet} + + + + + true + + + + + + + default repository + http://dist.wso2.org/p2/carbon/releases/4.4.1-SNAPSHOT + + + + + + + + true + + + + + + true + + diff --git a/modules/p2-profile-gen/pom.xml b/modules/p2-profile-gen/pom.xml index 04871576..b78505c7 100644 --- a/modules/p2-profile-gen/pom.xml +++ b/modules/p2-profile-gen/pom.xml @@ -773,7 +773,12 @@ org.wso2.carbon.commons:org.wso2.carbon.deployment.synchronizer.feature:${carbon.commons.version} - + + org.wso2.carbon.dashboards:org.wso2.carbon.dashboards.shindig.feature:${carbon.dashboard.version} + + + org.wso2.carbon.dashboards:org.wso2.carbon.dashboards.portal.feature:${carbon.dashboard.version} + @@ -1629,6 +1634,14 @@ ${carbon.event-processing.version} + + org.wso2.carbon.dashboards.shindig.feature.group + ${carbon.dashboard.version} + + + org.wso2.carbon.dashboards.portal.feature.group + ${carbon.dashboard.version} + diff --git a/pom.xml b/pom.xml index 2fe1efa5..139ab786 100644 --- a/pom.xml +++ b/pom.xml @@ -1080,6 +1080,7 @@ 1.0.4 1.0.0-wso2v3 + 1.0.9 1.0.0 2.0.9 4.3.2 From b7661d286b4b687ec026f050a0e977b39137ef05 Mon Sep 17 00:00:00 2001 From: menaka Date: Fri, 11 Dec 2015 11:15:00 +0530 Subject: [PATCH 12/24] DB schema for android sense and script change --- modules/distribution/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/distribution/pom.xml b/modules/distribution/pom.xml index b17357ee..8b4d6540 100644 --- a/modules/distribution/pom.xml +++ b/modules/distribution/pom.xml @@ -260,7 +260,7 @@ - + create-android-sense-plugin-mgt-schema package From b1c9246ffa4e44606c9be3a18baecf66bc716f41 Mon Sep 17 00:00:00 2001 From: menaka Date: Fri, 11 Dec 2015 11:29:26 +0530 Subject: [PATCH 13/24] db script error resolved --- modules/distribution/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/distribution/pom.xml b/modules/distribution/pom.xml index 8b4d6540..f4211bb4 100644 --- a/modules/distribution/pom.xml +++ b/modules/distribution/pom.xml @@ -284,7 +284,7 @@ + file="${basedir}/../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/dbscripts/cdm/plugins/androidsense/h2.sql"/> From de857cfc6ed62f30fe516b44d16dfb95a7da72b5 Mon Sep 17 00:00:00 2001 From: charithag Date: Fri, 11 Dec 2015 12:12:42 +0530 Subject: [PATCH 14/24] Fix issue in script --- .../conf/datasources/master-datasources.xml | 21 ------------------- .../Accelerometer_Sensor_Script.xml | 2 +- 2 files changed, 1 insertion(+), 22 deletions(-) diff --git a/modules/distribution/src/repository/conf/datasources/master-datasources.xml b/modules/distribution/src/repository/conf/datasources/master-datasources.xml index 32840e8e..1627f55f 100755 --- a/modules/distribution/src/repository/conf/datasources/master-datasources.xml +++ b/modules/distribution/src/repository/conf/datasources/master-datasources.xml @@ -217,26 +217,5 @@ - - AndroidSenseDM_DB - The datasource used for the Android-Sense database - - jdbc/AndroidSenseDM_DB - - - - jdbc:h2:repository/database/AndroidSenseDM_DB;DB_CLOSE_ON_EXIT=FALSE - - wso2carbon - wso2carbon - org.h2.Driver - 50 - 60000 - true - SELECT 1 - 30000 - - - diff --git a/modules/distribution/src/statistics/carbonapps/Accelerometer/Sparkscripts_1.0.0/Accelerometer_Sensor_Script.xml b/modules/distribution/src/statistics/carbonapps/Accelerometer/Sparkscripts_1.0.0/Accelerometer_Sensor_Script.xml index b1cf3810..80cf89b5 100644 --- a/modules/distribution/src/statistics/carbonapps/Accelerometer/Sparkscripts_1.0.0/Accelerometer_Sensor_Script.xml +++ b/modules/distribution/src/statistics/carbonapps/Accelerometer/Sparkscripts_1.0.0/Accelerometer_Sensor_Script.xml @@ -7,7 +7,7 @@ CREATE TEMPORARY TABLE DeviceAccelerometerData USING CarbonAnalytics OPTIONS(tab CREATE TEMPORARY TABLE DeviceAccelerometerSummaryData USING CarbonAnalytics OPTIONS (tableName "DEVICE_ACCELEROMETER_SUMMARY", schema "accelerometer FLOAT, deviceType STRING -i, deviceId STRING -i, owner STRING -i, time LONG -i",primaryKeys "deviceType, deviceId, owner, time"); -insert overwrite table DeviceAccelerometerSummaryData select accelerometer, meta_deviceType as deviceType, meta_deviceId as deviceId, meta_owner as owner, cast(meta_time/1000 as BIGINT)as time from DeviceAccelerometerData group by battery, meta_deviceType, meta_deviceId, meta_owner, cast(meta_time/1000 as BIGINT); +insert overwrite table DeviceAccelerometerSummaryData select accelerometer, meta_deviceType as deviceType, meta_deviceId as deviceId, meta_owner as owner, cast(meta_time/1000 as BIGINT)as time from DeviceAccelerometerData group by accelerometer, meta_deviceType, meta_deviceId, meta_owner, cast(meta_time/1000 as BIGINT); 0 * * * * ? From 43cdc86543d6040a096094c27e5f3911dbd66d74 Mon Sep 17 00:00:00 2001 From: menaka Date: Fri, 11 Dec 2015 12:22:39 +0530 Subject: [PATCH 15/24] db script error resolved --- modules/distribution/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/distribution/pom.xml b/modules/distribution/pom.xml index f4211bb4..8b4d6540 100644 --- a/modules/distribution/pom.xml +++ b/modules/distribution/pom.xml @@ -284,7 +284,7 @@ + file="${basedir}/../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/dbscripts/cdm/plugins/android_sense/h2.sql"/> From 194843c91aefce807b455b17d88c0f886b7694ec Mon Sep 17 00:00:00 2001 From: Menaka Madushanka Date: Fri, 11 Dec 2015 14:27:40 +0530 Subject: [PATCH 16/24] spark scripts for the other sensors --- .../EventReceiver_gravity.xml | 8 ++++ .../Eventreceiver_gravaity_1.0.0/artifact.xml | 4 ++ .../Eventstore_gravity_1.0.0/artifact.xml | 4 ++ .../org_wso2_iot_devices_gravity.xml | 44 +++++++++++++++++++ .../Eventstream_gravity_1.0.0/artifact.xml | 5 +++ .../org.wso2.iot.devices.gravity_1.0.0.json | 20 +++++++++ .../Gravity_Sensor_Script.xml | 13 ++++++ .../Gravity/Sparkscripts_1.0.0/artifact.xml | 4 ++ .../carbonapps/Gravity/artifacts.xml | 11 +++++ .../EventReceiver_gyroscope.xml | 8 ++++ .../artifact.xml | 4 ++ .../Eventstore_gyroscope_1.0.0/artifact.xml | 4 ++ .../org_wso2_iot_devices_gyroscope.xml | 44 +++++++++++++++++++ .../Eventstream_gyroscope_1.0.0/artifact.xml | 5 +++ .../org.wso2.iot.devices.gyroscope_1.0.0.json | 20 +++++++++ .../Gyroscope_Sensor_Script.xml | 13 ++++++ .../Gyroscope/Sparkscripts_1.0.0/artifact.xml | 4 ++ .../carbonapps/Gyroscope/artifacts.xml | 11 +++++ .../EventReceiver_pressure.xml | 8 ++++ .../Eventreceiver_pressure_1.0.0/artifact.xml | 4 ++ .../Eventstore_pressure_1.0.0/artifact.xml | 4 ++ .../org_wso2_iot_devices_pressure.xml | 44 +++++++++++++++++++ .../Eventstream_pressure_1.0.0/artifact.xml | 5 +++ .../org.wso2.iot.devices.pressure_1.0.0.json | 20 +++++++++ .../Gyroscope_Sensor_Script.xml | 13 ++++++ .../Pressure/Sparkscripts_1.0.0/artifact.xml | 4 ++ .../carbonapps/Pressure/artifacts.xml | 11 +++++ .../EventReceiver_proximity.xml | 8 ++++ .../artifact.xml | 4 ++ .../Eventstore_proximity_1.0.0/artifact.xml | 4 ++ .../org_wso2_iot_devices_proximity.xml | 44 +++++++++++++++++++ .../Eventstream_proximity_1.0.0/artifact.xml | 5 +++ .../org.wso2.iot.devices.proximity_1.0.0.json | 20 +++++++++ .../Proximity_Sensor_Script.xml | 13 ++++++ .../Proximity/Sparkscripts_1.0.0/artifact.xml | 4 ++ .../carbonapps/Proximity/artifacts.xml | 11 +++++ .../EventReceiver_rotation.xml | 8 ++++ .../Eventreceiver_rotation_1.0.0/artifact.xml | 4 ++ .../Eventstore_rotation_1.0.0/artifact.xml | 4 ++ .../org_wso2_iot_devices_rotation.xml | 44 +++++++++++++++++++ .../Eventstream_rotation_1.0.0/artifact.xml | 5 +++ .../org.wso2.iot.devices.rotation_1.0.0.json | 20 +++++++++ .../Rotation_Sensor_Script.xml | 13 ++++++ .../Rotation/Sparkscripts_1.0.0/artifact.xml | 4 ++ .../carbonapps/Rotation/artifacts.xml | 11 +++++ 45 files changed, 565 insertions(+) create mode 100644 modules/distribution/src/statistics/carbonapps/Gravity/Eventreceiver_gravaity_1.0.0/EventReceiver_gravity.xml create mode 100644 modules/distribution/src/statistics/carbonapps/Gravity/Eventreceiver_gravaity_1.0.0/artifact.xml create mode 100644 modules/distribution/src/statistics/carbonapps/Gravity/Eventstore_gravity_1.0.0/artifact.xml create mode 100644 modules/distribution/src/statistics/carbonapps/Gravity/Eventstore_gravity_1.0.0/org_wso2_iot_devices_gravity.xml create mode 100644 modules/distribution/src/statistics/carbonapps/Gravity/Eventstream_gravity_1.0.0/artifact.xml create mode 100644 modules/distribution/src/statistics/carbonapps/Gravity/Eventstream_gravity_1.0.0/org.wso2.iot.devices.gravity_1.0.0.json create mode 100644 modules/distribution/src/statistics/carbonapps/Gravity/Sparkscripts_1.0.0/Gravity_Sensor_Script.xml create mode 100644 modules/distribution/src/statistics/carbonapps/Gravity/Sparkscripts_1.0.0/artifact.xml create mode 100644 modules/distribution/src/statistics/carbonapps/Gravity/artifacts.xml create mode 100644 modules/distribution/src/statistics/carbonapps/Gyroscope/Eventreceiver_gyroscope_1.0.0/EventReceiver_gyroscope.xml create mode 100644 modules/distribution/src/statistics/carbonapps/Gyroscope/Eventreceiver_gyroscope_1.0.0/artifact.xml create mode 100644 modules/distribution/src/statistics/carbonapps/Gyroscope/Eventstore_gyroscope_1.0.0/artifact.xml create mode 100644 modules/distribution/src/statistics/carbonapps/Gyroscope/Eventstore_gyroscope_1.0.0/org_wso2_iot_devices_gyroscope.xml create mode 100644 modules/distribution/src/statistics/carbonapps/Gyroscope/Eventstream_gyroscope_1.0.0/artifact.xml create mode 100644 modules/distribution/src/statistics/carbonapps/Gyroscope/Eventstream_gyroscope_1.0.0/org.wso2.iot.devices.gyroscope_1.0.0.json create mode 100644 modules/distribution/src/statistics/carbonapps/Gyroscope/Sparkscripts_1.0.0/Gyroscope_Sensor_Script.xml create mode 100644 modules/distribution/src/statistics/carbonapps/Gyroscope/Sparkscripts_1.0.0/artifact.xml create mode 100644 modules/distribution/src/statistics/carbonapps/Gyroscope/artifacts.xml create mode 100644 modules/distribution/src/statistics/carbonapps/Pressure/Eventreceiver_pressure_1.0.0/EventReceiver_pressure.xml create mode 100644 modules/distribution/src/statistics/carbonapps/Pressure/Eventreceiver_pressure_1.0.0/artifact.xml create mode 100644 modules/distribution/src/statistics/carbonapps/Pressure/Eventstore_pressure_1.0.0/artifact.xml create mode 100644 modules/distribution/src/statistics/carbonapps/Pressure/Eventstore_pressure_1.0.0/org_wso2_iot_devices_pressure.xml create mode 100644 modules/distribution/src/statistics/carbonapps/Pressure/Eventstream_pressure_1.0.0/artifact.xml create mode 100644 modules/distribution/src/statistics/carbonapps/Pressure/Eventstream_pressure_1.0.0/org.wso2.iot.devices.pressure_1.0.0.json create mode 100644 modules/distribution/src/statistics/carbonapps/Pressure/Sparkscripts_1.0.0/Gyroscope_Sensor_Script.xml create mode 100644 modules/distribution/src/statistics/carbonapps/Pressure/Sparkscripts_1.0.0/artifact.xml create mode 100644 modules/distribution/src/statistics/carbonapps/Pressure/artifacts.xml create mode 100644 modules/distribution/src/statistics/carbonapps/Proximity/Eventreceiver_proximity_1.0.0/EventReceiver_proximity.xml create mode 100644 modules/distribution/src/statistics/carbonapps/Proximity/Eventreceiver_proximity_1.0.0/artifact.xml create mode 100644 modules/distribution/src/statistics/carbonapps/Proximity/Eventstore_proximity_1.0.0/artifact.xml create mode 100644 modules/distribution/src/statistics/carbonapps/Proximity/Eventstore_proximity_1.0.0/org_wso2_iot_devices_proximity.xml create mode 100644 modules/distribution/src/statistics/carbonapps/Proximity/Eventstream_proximity_1.0.0/artifact.xml create mode 100644 modules/distribution/src/statistics/carbonapps/Proximity/Eventstream_proximity_1.0.0/org.wso2.iot.devices.proximity_1.0.0.json create mode 100644 modules/distribution/src/statistics/carbonapps/Proximity/Sparkscripts_1.0.0/Proximity_Sensor_Script.xml create mode 100644 modules/distribution/src/statistics/carbonapps/Proximity/Sparkscripts_1.0.0/artifact.xml create mode 100644 modules/distribution/src/statistics/carbonapps/Proximity/artifacts.xml create mode 100644 modules/distribution/src/statistics/carbonapps/Rotation/Eventreceiver_rotation_1.0.0/EventReceiver_rotation.xml create mode 100644 modules/distribution/src/statistics/carbonapps/Rotation/Eventreceiver_rotation_1.0.0/artifact.xml create mode 100644 modules/distribution/src/statistics/carbonapps/Rotation/Eventstore_rotation_1.0.0/artifact.xml create mode 100644 modules/distribution/src/statistics/carbonapps/Rotation/Eventstore_rotation_1.0.0/org_wso2_iot_devices_rotation.xml create mode 100644 modules/distribution/src/statistics/carbonapps/Rotation/Eventstream_rotation_1.0.0/artifact.xml create mode 100644 modules/distribution/src/statistics/carbonapps/Rotation/Eventstream_rotation_1.0.0/org.wso2.iot.devices.rotation_1.0.0.json create mode 100644 modules/distribution/src/statistics/carbonapps/Rotation/Sparkscripts_1.0.0/Rotation_Sensor_Script.xml create mode 100644 modules/distribution/src/statistics/carbonapps/Rotation/Sparkscripts_1.0.0/artifact.xml create mode 100644 modules/distribution/src/statistics/carbonapps/Rotation/artifacts.xml diff --git a/modules/distribution/src/statistics/carbonapps/Gravity/Eventreceiver_gravaity_1.0.0/EventReceiver_gravity.xml b/modules/distribution/src/statistics/carbonapps/Gravity/Eventreceiver_gravaity_1.0.0/EventReceiver_gravity.xml new file mode 100644 index 00000000..86efcbfb --- /dev/null +++ b/modules/distribution/src/statistics/carbonapps/Gravity/Eventreceiver_gravaity_1.0.0/EventReceiver_gravity.xml @@ -0,0 +1,8 @@ + + + + false + + + + diff --git a/modules/distribution/src/statistics/carbonapps/Gravity/Eventreceiver_gravaity_1.0.0/artifact.xml b/modules/distribution/src/statistics/carbonapps/Gravity/Eventreceiver_gravaity_1.0.0/artifact.xml new file mode 100644 index 00000000..e150a5c6 --- /dev/null +++ b/modules/distribution/src/statistics/carbonapps/Gravity/Eventreceiver_gravaity_1.0.0/artifact.xml @@ -0,0 +1,4 @@ + + + EventReceiver_gravity.xml + diff --git a/modules/distribution/src/statistics/carbonapps/Gravity/Eventstore_gravity_1.0.0/artifact.xml b/modules/distribution/src/statistics/carbonapps/Gravity/Eventstore_gravity_1.0.0/artifact.xml new file mode 100644 index 00000000..d54e89a9 --- /dev/null +++ b/modules/distribution/src/statistics/carbonapps/Gravity/Eventstore_gravity_1.0.0/artifact.xml @@ -0,0 +1,4 @@ + + + org_wso2_iot_devices_gravity.xml + diff --git a/modules/distribution/src/statistics/carbonapps/Gravity/Eventstore_gravity_1.0.0/org_wso2_iot_devices_gravity.xml b/modules/distribution/src/statistics/carbonapps/Gravity/Eventstore_gravity_1.0.0/org_wso2_iot_devices_gravity.xml new file mode 100644 index 00000000..3a575434 --- /dev/null +++ b/modules/distribution/src/statistics/carbonapps/Gravity/Eventstore_gravity_1.0.0/org_wso2_iot_devices_gravity.xml @@ -0,0 +1,44 @@ + + + + org.wso2.iot.devices.gravity:1.0.0 + + EVENT_STORE + + + meta_owner + true + true + false + STRING + + + meta_deviceType + true + true + false + STRING + + + meta_deviceId + true + true + false + STRING + + + meta_time + true + true + false + LONG + + + gravity + false + false + false + FLOAT + + + \ No newline at end of file diff --git a/modules/distribution/src/statistics/carbonapps/Gravity/Eventstream_gravity_1.0.0/artifact.xml b/modules/distribution/src/statistics/carbonapps/Gravity/Eventstream_gravity_1.0.0/artifact.xml new file mode 100644 index 00000000..2953fd5b --- /dev/null +++ b/modules/distribution/src/statistics/carbonapps/Gravity/Eventstream_gravity_1.0.0/artifact.xml @@ -0,0 +1,5 @@ + + + org.wso2.iot.devices.gravity_1.0.0.json + + diff --git a/modules/distribution/src/statistics/carbonapps/Gravity/Eventstream_gravity_1.0.0/org.wso2.iot.devices.gravity_1.0.0.json b/modules/distribution/src/statistics/carbonapps/Gravity/Eventstream_gravity_1.0.0/org.wso2.iot.devices.gravity_1.0.0.json new file mode 100644 index 00000000..f18bd87b --- /dev/null +++ b/modules/distribution/src/statistics/carbonapps/Gravity/Eventstream_gravity_1.0.0/org.wso2.iot.devices.gravity_1.0.0.json @@ -0,0 +1,20 @@ +{ + "name": "org.wso2.iot.devices.gravity", + "version": "1.0.0", + "nickName": "Gravity Data", + "description": "Gravity data received from the Device", + "metaData": [ + {"name":"owner","type":"STRING"}, + {"name":"deviceType","type":"STRING"}, + {"name":"deviceId","type":"STRING"}, + {"name":"time","type":"LONG"} + ], + "payloadData": [ + { + "name": "gravity","type": "FLOAT" + } + ] +} + + + diff --git a/modules/distribution/src/statistics/carbonapps/Gravity/Sparkscripts_1.0.0/Gravity_Sensor_Script.xml b/modules/distribution/src/statistics/carbonapps/Gravity/Sparkscripts_1.0.0/Gravity_Sensor_Script.xml new file mode 100644 index 00000000..34bcb8d0 --- /dev/null +++ b/modules/distribution/src/statistics/carbonapps/Gravity/Sparkscripts_1.0.0/Gravity_Sensor_Script.xml @@ -0,0 +1,13 @@ + + + IoTServer_Sensor_Script + + 0 * * * * ? + diff --git a/modules/distribution/src/statistics/carbonapps/Gravity/Sparkscripts_1.0.0/artifact.xml b/modules/distribution/src/statistics/carbonapps/Gravity/Sparkscripts_1.0.0/artifact.xml new file mode 100644 index 00000000..0d5f122e --- /dev/null +++ b/modules/distribution/src/statistics/carbonapps/Gravity/Sparkscripts_1.0.0/artifact.xml @@ -0,0 +1,4 @@ + + + Gravity_Sensor_Script.xml + diff --git a/modules/distribution/src/statistics/carbonapps/Gravity/artifacts.xml b/modules/distribution/src/statistics/carbonapps/Gravity/artifacts.xml new file mode 100644 index 00000000..1a9e815e --- /dev/null +++ b/modules/distribution/src/statistics/carbonapps/Gravity/artifacts.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/modules/distribution/src/statistics/carbonapps/Gyroscope/Eventreceiver_gyroscope_1.0.0/EventReceiver_gyroscope.xml b/modules/distribution/src/statistics/carbonapps/Gyroscope/Eventreceiver_gyroscope_1.0.0/EventReceiver_gyroscope.xml new file mode 100644 index 00000000..f5aa74ea --- /dev/null +++ b/modules/distribution/src/statistics/carbonapps/Gyroscope/Eventreceiver_gyroscope_1.0.0/EventReceiver_gyroscope.xml @@ -0,0 +1,8 @@ + + + + false + + + + diff --git a/modules/distribution/src/statistics/carbonapps/Gyroscope/Eventreceiver_gyroscope_1.0.0/artifact.xml b/modules/distribution/src/statistics/carbonapps/Gyroscope/Eventreceiver_gyroscope_1.0.0/artifact.xml new file mode 100644 index 00000000..4d4a7b91 --- /dev/null +++ b/modules/distribution/src/statistics/carbonapps/Gyroscope/Eventreceiver_gyroscope_1.0.0/artifact.xml @@ -0,0 +1,4 @@ + + + EventReceiver_gyroscope.xml + diff --git a/modules/distribution/src/statistics/carbonapps/Gyroscope/Eventstore_gyroscope_1.0.0/artifact.xml b/modules/distribution/src/statistics/carbonapps/Gyroscope/Eventstore_gyroscope_1.0.0/artifact.xml new file mode 100644 index 00000000..73fbde21 --- /dev/null +++ b/modules/distribution/src/statistics/carbonapps/Gyroscope/Eventstore_gyroscope_1.0.0/artifact.xml @@ -0,0 +1,4 @@ + + + org_wso2_iot_devices_gyroscope.xml + diff --git a/modules/distribution/src/statistics/carbonapps/Gyroscope/Eventstore_gyroscope_1.0.0/org_wso2_iot_devices_gyroscope.xml b/modules/distribution/src/statistics/carbonapps/Gyroscope/Eventstore_gyroscope_1.0.0/org_wso2_iot_devices_gyroscope.xml new file mode 100644 index 00000000..603711c1 --- /dev/null +++ b/modules/distribution/src/statistics/carbonapps/Gyroscope/Eventstore_gyroscope_1.0.0/org_wso2_iot_devices_gyroscope.xml @@ -0,0 +1,44 @@ + + + + org.wso2.iot.devices.gyroscope:1.0.0 + + EVENT_STORE + + + meta_owner + true + true + false + STRING + + + meta_deviceType + true + true + false + STRING + + + meta_deviceId + true + true + false + STRING + + + meta_time + true + true + false + LONG + + + gyroscope + false + false + false + FLOAT + + + \ No newline at end of file diff --git a/modules/distribution/src/statistics/carbonapps/Gyroscope/Eventstream_gyroscope_1.0.0/artifact.xml b/modules/distribution/src/statistics/carbonapps/Gyroscope/Eventstream_gyroscope_1.0.0/artifact.xml new file mode 100644 index 00000000..e09e166e --- /dev/null +++ b/modules/distribution/src/statistics/carbonapps/Gyroscope/Eventstream_gyroscope_1.0.0/artifact.xml @@ -0,0 +1,5 @@ + + + org.wso2.iot.devices.gyroscope_1.0.0.json + + diff --git a/modules/distribution/src/statistics/carbonapps/Gyroscope/Eventstream_gyroscope_1.0.0/org.wso2.iot.devices.gyroscope_1.0.0.json b/modules/distribution/src/statistics/carbonapps/Gyroscope/Eventstream_gyroscope_1.0.0/org.wso2.iot.devices.gyroscope_1.0.0.json new file mode 100644 index 00000000..0583da29 --- /dev/null +++ b/modules/distribution/src/statistics/carbonapps/Gyroscope/Eventstream_gyroscope_1.0.0/org.wso2.iot.devices.gyroscope_1.0.0.json @@ -0,0 +1,20 @@ +{ + "name": "org.wso2.iot.devices.gyroscope", + "version": "1.0.0", + "nickName": "Gyroscope Data", + "description": "Gyroscope data received from the Device", + "metaData": [ + {"name":"owner","type":"STRING"}, + {"name":"deviceType","type":"STRING"}, + {"name":"deviceId","type":"STRING"}, + {"name":"time","type":"LONG"} + ], + "payloadData": [ + { + "name": "gyroscope","type": "FLOAT" + } + ] +} + + + diff --git a/modules/distribution/src/statistics/carbonapps/Gyroscope/Sparkscripts_1.0.0/Gyroscope_Sensor_Script.xml b/modules/distribution/src/statistics/carbonapps/Gyroscope/Sparkscripts_1.0.0/Gyroscope_Sensor_Script.xml new file mode 100644 index 00000000..f26032cf --- /dev/null +++ b/modules/distribution/src/statistics/carbonapps/Gyroscope/Sparkscripts_1.0.0/Gyroscope_Sensor_Script.xml @@ -0,0 +1,13 @@ + + + IoTServer_Sensor_Script + + 0 * * * * ? + diff --git a/modules/distribution/src/statistics/carbonapps/Gyroscope/Sparkscripts_1.0.0/artifact.xml b/modules/distribution/src/statistics/carbonapps/Gyroscope/Sparkscripts_1.0.0/artifact.xml new file mode 100644 index 00000000..3fcf3d50 --- /dev/null +++ b/modules/distribution/src/statistics/carbonapps/Gyroscope/Sparkscripts_1.0.0/artifact.xml @@ -0,0 +1,4 @@ + + + Gyroscope_Sensor_Script.xml + diff --git a/modules/distribution/src/statistics/carbonapps/Gyroscope/artifacts.xml b/modules/distribution/src/statistics/carbonapps/Gyroscope/artifacts.xml new file mode 100644 index 00000000..6a3ea818 --- /dev/null +++ b/modules/distribution/src/statistics/carbonapps/Gyroscope/artifacts.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/modules/distribution/src/statistics/carbonapps/Pressure/Eventreceiver_pressure_1.0.0/EventReceiver_pressure.xml b/modules/distribution/src/statistics/carbonapps/Pressure/Eventreceiver_pressure_1.0.0/EventReceiver_pressure.xml new file mode 100644 index 00000000..76ac8619 --- /dev/null +++ b/modules/distribution/src/statistics/carbonapps/Pressure/Eventreceiver_pressure_1.0.0/EventReceiver_pressure.xml @@ -0,0 +1,8 @@ + + + + false + + + + diff --git a/modules/distribution/src/statistics/carbonapps/Pressure/Eventreceiver_pressure_1.0.0/artifact.xml b/modules/distribution/src/statistics/carbonapps/Pressure/Eventreceiver_pressure_1.0.0/artifact.xml new file mode 100644 index 00000000..c611037c --- /dev/null +++ b/modules/distribution/src/statistics/carbonapps/Pressure/Eventreceiver_pressure_1.0.0/artifact.xml @@ -0,0 +1,4 @@ + + + EventReceiver_pressure.xml + diff --git a/modules/distribution/src/statistics/carbonapps/Pressure/Eventstore_pressure_1.0.0/artifact.xml b/modules/distribution/src/statistics/carbonapps/Pressure/Eventstore_pressure_1.0.0/artifact.xml new file mode 100644 index 00000000..dfae64f1 --- /dev/null +++ b/modules/distribution/src/statistics/carbonapps/Pressure/Eventstore_pressure_1.0.0/artifact.xml @@ -0,0 +1,4 @@ + + + org_wso2_iot_devices_pressure.xml + diff --git a/modules/distribution/src/statistics/carbonapps/Pressure/Eventstore_pressure_1.0.0/org_wso2_iot_devices_pressure.xml b/modules/distribution/src/statistics/carbonapps/Pressure/Eventstore_pressure_1.0.0/org_wso2_iot_devices_pressure.xml new file mode 100644 index 00000000..2533da29 --- /dev/null +++ b/modules/distribution/src/statistics/carbonapps/Pressure/Eventstore_pressure_1.0.0/org_wso2_iot_devices_pressure.xml @@ -0,0 +1,44 @@ + + + + org.wso2.iot.devices.pressure:1.0.0 + + EVENT_STORE + + + meta_owner + true + true + false + STRING + + + meta_deviceType + true + true + false + STRING + + + meta_deviceId + true + true + false + STRING + + + meta_time + true + true + false + LONG + + + pressure + false + false + false + FLOAT + + + \ No newline at end of file diff --git a/modules/distribution/src/statistics/carbonapps/Pressure/Eventstream_pressure_1.0.0/artifact.xml b/modules/distribution/src/statistics/carbonapps/Pressure/Eventstream_pressure_1.0.0/artifact.xml new file mode 100644 index 00000000..2a2f8868 --- /dev/null +++ b/modules/distribution/src/statistics/carbonapps/Pressure/Eventstream_pressure_1.0.0/artifact.xml @@ -0,0 +1,5 @@ + + + org.wso2.iot.devices.pressure_1.0.0.json + + diff --git a/modules/distribution/src/statistics/carbonapps/Pressure/Eventstream_pressure_1.0.0/org.wso2.iot.devices.pressure_1.0.0.json b/modules/distribution/src/statistics/carbonapps/Pressure/Eventstream_pressure_1.0.0/org.wso2.iot.devices.pressure_1.0.0.json new file mode 100644 index 00000000..f58059d2 --- /dev/null +++ b/modules/distribution/src/statistics/carbonapps/Pressure/Eventstream_pressure_1.0.0/org.wso2.iot.devices.pressure_1.0.0.json @@ -0,0 +1,20 @@ +{ + "name": "org.wso2.iot.devices.pressure", + "version": "1.0.0", + "nickName": "Pressure Data", + "description": "Pressure data received from the Device", + "metaData": [ + {"name":"owner","type":"STRING"}, + {"name":"deviceType","type":"STRING"}, + {"name":"deviceId","type":"STRING"}, + {"name":"time","type":"LONG"} + ], + "payloadData": [ + { + "name": "pressure","type": "FLOAT" + } + ] +} + + + diff --git a/modules/distribution/src/statistics/carbonapps/Pressure/Sparkscripts_1.0.0/Gyroscope_Sensor_Script.xml b/modules/distribution/src/statistics/carbonapps/Pressure/Sparkscripts_1.0.0/Gyroscope_Sensor_Script.xml new file mode 100644 index 00000000..d6c0e353 --- /dev/null +++ b/modules/distribution/src/statistics/carbonapps/Pressure/Sparkscripts_1.0.0/Gyroscope_Sensor_Script.xml @@ -0,0 +1,13 @@ + + + IoTServer_Sensor_Script + + 0 * * * * ? + diff --git a/modules/distribution/src/statistics/carbonapps/Pressure/Sparkscripts_1.0.0/artifact.xml b/modules/distribution/src/statistics/carbonapps/Pressure/Sparkscripts_1.0.0/artifact.xml new file mode 100644 index 00000000..3fcf3d50 --- /dev/null +++ b/modules/distribution/src/statistics/carbonapps/Pressure/Sparkscripts_1.0.0/artifact.xml @@ -0,0 +1,4 @@ + + + Gyroscope_Sensor_Script.xml + diff --git a/modules/distribution/src/statistics/carbonapps/Pressure/artifacts.xml b/modules/distribution/src/statistics/carbonapps/Pressure/artifacts.xml new file mode 100644 index 00000000..249b33da --- /dev/null +++ b/modules/distribution/src/statistics/carbonapps/Pressure/artifacts.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/modules/distribution/src/statistics/carbonapps/Proximity/Eventreceiver_proximity_1.0.0/EventReceiver_proximity.xml b/modules/distribution/src/statistics/carbonapps/Proximity/Eventreceiver_proximity_1.0.0/EventReceiver_proximity.xml new file mode 100644 index 00000000..d57d2e0a --- /dev/null +++ b/modules/distribution/src/statistics/carbonapps/Proximity/Eventreceiver_proximity_1.0.0/EventReceiver_proximity.xml @@ -0,0 +1,8 @@ + + + + false + + + + diff --git a/modules/distribution/src/statistics/carbonapps/Proximity/Eventreceiver_proximity_1.0.0/artifact.xml b/modules/distribution/src/statistics/carbonapps/Proximity/Eventreceiver_proximity_1.0.0/artifact.xml new file mode 100644 index 00000000..1e3fbccb --- /dev/null +++ b/modules/distribution/src/statistics/carbonapps/Proximity/Eventreceiver_proximity_1.0.0/artifact.xml @@ -0,0 +1,4 @@ + + + EventReceiver_proximity.xml + diff --git a/modules/distribution/src/statistics/carbonapps/Proximity/Eventstore_proximity_1.0.0/artifact.xml b/modules/distribution/src/statistics/carbonapps/Proximity/Eventstore_proximity_1.0.0/artifact.xml new file mode 100644 index 00000000..bdcffa5b --- /dev/null +++ b/modules/distribution/src/statistics/carbonapps/Proximity/Eventstore_proximity_1.0.0/artifact.xml @@ -0,0 +1,4 @@ + + + org_wso2_iot_devices_proximity.xml + diff --git a/modules/distribution/src/statistics/carbonapps/Proximity/Eventstore_proximity_1.0.0/org_wso2_iot_devices_proximity.xml b/modules/distribution/src/statistics/carbonapps/Proximity/Eventstore_proximity_1.0.0/org_wso2_iot_devices_proximity.xml new file mode 100644 index 00000000..f0958f01 --- /dev/null +++ b/modules/distribution/src/statistics/carbonapps/Proximity/Eventstore_proximity_1.0.0/org_wso2_iot_devices_proximity.xml @@ -0,0 +1,44 @@ + + + + org.wso2.iot.devices.proximity:1.0.0 + + EVENT_STORE + + + meta_owner + true + true + false + STRING + + + meta_deviceType + true + true + false + STRING + + + meta_deviceId + true + true + false + STRING + + + meta_time + true + true + false + LONG + + + proximity + false + false + false + FLOAT + + + \ No newline at end of file diff --git a/modules/distribution/src/statistics/carbonapps/Proximity/Eventstream_proximity_1.0.0/artifact.xml b/modules/distribution/src/statistics/carbonapps/Proximity/Eventstream_proximity_1.0.0/artifact.xml new file mode 100644 index 00000000..bec60673 --- /dev/null +++ b/modules/distribution/src/statistics/carbonapps/Proximity/Eventstream_proximity_1.0.0/artifact.xml @@ -0,0 +1,5 @@ + + + org.wso2.iot.devices.proximity_1.0.0.json + + diff --git a/modules/distribution/src/statistics/carbonapps/Proximity/Eventstream_proximity_1.0.0/org.wso2.iot.devices.proximity_1.0.0.json b/modules/distribution/src/statistics/carbonapps/Proximity/Eventstream_proximity_1.0.0/org.wso2.iot.devices.proximity_1.0.0.json new file mode 100644 index 00000000..88fb9008 --- /dev/null +++ b/modules/distribution/src/statistics/carbonapps/Proximity/Eventstream_proximity_1.0.0/org.wso2.iot.devices.proximity_1.0.0.json @@ -0,0 +1,20 @@ +{ + "name": "org.wso2.iot.devices.proximity", + "version": "1.0.0", + "nickName": "Proximity Data", + "description": "Proximity data received from the Device", + "metaData": [ + {"name":"owner","type":"STRING"}, + {"name":"deviceType","type":"STRING"}, + {"name":"deviceId","type":"STRING"}, + {"name":"time","type":"LONG"} + ], + "payloadData": [ + { + "name": "proximity","type": "FLOAT" + } + ] +} + + + diff --git a/modules/distribution/src/statistics/carbonapps/Proximity/Sparkscripts_1.0.0/Proximity_Sensor_Script.xml b/modules/distribution/src/statistics/carbonapps/Proximity/Sparkscripts_1.0.0/Proximity_Sensor_Script.xml new file mode 100644 index 00000000..889cfca6 --- /dev/null +++ b/modules/distribution/src/statistics/carbonapps/Proximity/Sparkscripts_1.0.0/Proximity_Sensor_Script.xml @@ -0,0 +1,13 @@ + + + IoTServer_Sensor_Script + + 0 * * * * ? + diff --git a/modules/distribution/src/statistics/carbonapps/Proximity/Sparkscripts_1.0.0/artifact.xml b/modules/distribution/src/statistics/carbonapps/Proximity/Sparkscripts_1.0.0/artifact.xml new file mode 100644 index 00000000..c3bc1d61 --- /dev/null +++ b/modules/distribution/src/statistics/carbonapps/Proximity/Sparkscripts_1.0.0/artifact.xml @@ -0,0 +1,4 @@ + + + Proximity_Sensor_Script.xml + diff --git a/modules/distribution/src/statistics/carbonapps/Proximity/artifacts.xml b/modules/distribution/src/statistics/carbonapps/Proximity/artifacts.xml new file mode 100644 index 00000000..d682d5b6 --- /dev/null +++ b/modules/distribution/src/statistics/carbonapps/Proximity/artifacts.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/modules/distribution/src/statistics/carbonapps/Rotation/Eventreceiver_rotation_1.0.0/EventReceiver_rotation.xml b/modules/distribution/src/statistics/carbonapps/Rotation/Eventreceiver_rotation_1.0.0/EventReceiver_rotation.xml new file mode 100644 index 00000000..df0dfb57 --- /dev/null +++ b/modules/distribution/src/statistics/carbonapps/Rotation/Eventreceiver_rotation_1.0.0/EventReceiver_rotation.xml @@ -0,0 +1,8 @@ + + + + false + + + + diff --git a/modules/distribution/src/statistics/carbonapps/Rotation/Eventreceiver_rotation_1.0.0/artifact.xml b/modules/distribution/src/statistics/carbonapps/Rotation/Eventreceiver_rotation_1.0.0/artifact.xml new file mode 100644 index 00000000..3395400e --- /dev/null +++ b/modules/distribution/src/statistics/carbonapps/Rotation/Eventreceiver_rotation_1.0.0/artifact.xml @@ -0,0 +1,4 @@ + + + EventReceiver_rotation.xml + diff --git a/modules/distribution/src/statistics/carbonapps/Rotation/Eventstore_rotation_1.0.0/artifact.xml b/modules/distribution/src/statistics/carbonapps/Rotation/Eventstore_rotation_1.0.0/artifact.xml new file mode 100644 index 00000000..6a75eba8 --- /dev/null +++ b/modules/distribution/src/statistics/carbonapps/Rotation/Eventstore_rotation_1.0.0/artifact.xml @@ -0,0 +1,4 @@ + + + org_wso2_iot_devices_rotation.xml + diff --git a/modules/distribution/src/statistics/carbonapps/Rotation/Eventstore_rotation_1.0.0/org_wso2_iot_devices_rotation.xml b/modules/distribution/src/statistics/carbonapps/Rotation/Eventstore_rotation_1.0.0/org_wso2_iot_devices_rotation.xml new file mode 100644 index 00000000..8e6863f5 --- /dev/null +++ b/modules/distribution/src/statistics/carbonapps/Rotation/Eventstore_rotation_1.0.0/org_wso2_iot_devices_rotation.xml @@ -0,0 +1,44 @@ + + + + org.wso2.iot.devices.rotation:1.0.0 + + EVENT_STORE + + + meta_owner + true + true + false + STRING + + + meta_deviceType + true + true + false + STRING + + + meta_deviceId + true + true + false + STRING + + + meta_time + true + true + false + LONG + + + rotation + false + false + false + FLOAT + + + \ No newline at end of file diff --git a/modules/distribution/src/statistics/carbonapps/Rotation/Eventstream_rotation_1.0.0/artifact.xml b/modules/distribution/src/statistics/carbonapps/Rotation/Eventstream_rotation_1.0.0/artifact.xml new file mode 100644 index 00000000..21982655 --- /dev/null +++ b/modules/distribution/src/statistics/carbonapps/Rotation/Eventstream_rotation_1.0.0/artifact.xml @@ -0,0 +1,5 @@ + + + org.wso2.iot.devices.rotation_1.0.0.json + + diff --git a/modules/distribution/src/statistics/carbonapps/Rotation/Eventstream_rotation_1.0.0/org.wso2.iot.devices.rotation_1.0.0.json b/modules/distribution/src/statistics/carbonapps/Rotation/Eventstream_rotation_1.0.0/org.wso2.iot.devices.rotation_1.0.0.json new file mode 100644 index 00000000..03881bcf --- /dev/null +++ b/modules/distribution/src/statistics/carbonapps/Rotation/Eventstream_rotation_1.0.0/org.wso2.iot.devices.rotation_1.0.0.json @@ -0,0 +1,20 @@ +{ + "name": "org.wso2.iot.devices.rotation", + "version": "1.0.0", + "nickName": "Rotation Data", + "description": "Rotation data received from the Device", + "metaData": [ + {"name":"owner","type":"STRING"}, + {"name":"deviceType","type":"STRING"}, + {"name":"deviceId","type":"STRING"}, + {"name":"time","type":"LONG"} + ], + "payloadData": [ + { + "name": "rotation","type": "FLOAT" + } + ] +} + + + diff --git a/modules/distribution/src/statistics/carbonapps/Rotation/Sparkscripts_1.0.0/Rotation_Sensor_Script.xml b/modules/distribution/src/statistics/carbonapps/Rotation/Sparkscripts_1.0.0/Rotation_Sensor_Script.xml new file mode 100644 index 00000000..ed2730eb --- /dev/null +++ b/modules/distribution/src/statistics/carbonapps/Rotation/Sparkscripts_1.0.0/Rotation_Sensor_Script.xml @@ -0,0 +1,13 @@ + + + IoTServer_Sensor_Script + + 0 * * * * ? + diff --git a/modules/distribution/src/statistics/carbonapps/Rotation/Sparkscripts_1.0.0/artifact.xml b/modules/distribution/src/statistics/carbonapps/Rotation/Sparkscripts_1.0.0/artifact.xml new file mode 100644 index 00000000..59ec9383 --- /dev/null +++ b/modules/distribution/src/statistics/carbonapps/Rotation/Sparkscripts_1.0.0/artifact.xml @@ -0,0 +1,4 @@ + + + Rotation_Sensor_Script.xml + diff --git a/modules/distribution/src/statistics/carbonapps/Rotation/artifacts.xml b/modules/distribution/src/statistics/carbonapps/Rotation/artifacts.xml new file mode 100644 index 00000000..4a2b6e95 --- /dev/null +++ b/modules/distribution/src/statistics/carbonapps/Rotation/artifacts.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + From 88a09c8cab1587db883932f3857691502c7226bf Mon Sep 17 00:00:00 2001 From: Menaka Madushanka Date: Fri, 11 Dec 2015 14:41:04 +0530 Subject: [PATCH 17/24] spark scripts for the other sensors + build.xml edited --- .../src/statistics/carbonapps/build.xml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/modules/distribution/src/statistics/carbonapps/build.xml b/modules/distribution/src/statistics/carbonapps/build.xml index 129ecab7..8ac17852 100644 --- a/modules/distribution/src/statistics/carbonapps/build.xml +++ b/modules/distribution/src/statistics/carbonapps/build.xml @@ -33,5 +33,20 @@ + + + + + + + + + + + + + + + From 454b24db1f30493120ac1de73ac237329ed4d09a Mon Sep 17 00:00:00 2001 From: Menaka Madushanka Date: Fri, 11 Dec 2015 14:47:50 +0530 Subject: [PATCH 18/24] spark scripts for the other sensors + build.xml edited --- modules/distribution/src/statistics/carbonapps/build.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/distribution/src/statistics/carbonapps/build.xml b/modules/distribution/src/statistics/carbonapps/build.xml index 8ac17852..b3d87e62 100644 --- a/modules/distribution/src/statistics/carbonapps/build.xml +++ b/modules/distribution/src/statistics/carbonapps/build.xml @@ -10,6 +10,11 @@ + + + + + From 9857e2f2b4cbcc4ef836e6deb89c9c023893d8ce Mon Sep 17 00:00:00 2001 From: Menaka Madushanka Date: Fri, 11 Dec 2015 15:30:34 +0530 Subject: [PATCH 19/24] spark script for pressure --- .../{Gyroscope_Sensor_Script.xml => Pressure_Sensor_Script.xml} | 0 .../carbonapps/Pressure/Sparkscripts_1.0.0/artifact.xml | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename modules/distribution/src/statistics/carbonapps/Pressure/Sparkscripts_1.0.0/{Gyroscope_Sensor_Script.xml => Pressure_Sensor_Script.xml} (100%) diff --git a/modules/distribution/src/statistics/carbonapps/Pressure/Sparkscripts_1.0.0/Gyroscope_Sensor_Script.xml b/modules/distribution/src/statistics/carbonapps/Pressure/Sparkscripts_1.0.0/Pressure_Sensor_Script.xml similarity index 100% rename from modules/distribution/src/statistics/carbonapps/Pressure/Sparkscripts_1.0.0/Gyroscope_Sensor_Script.xml rename to modules/distribution/src/statistics/carbonapps/Pressure/Sparkscripts_1.0.0/Pressure_Sensor_Script.xml diff --git a/modules/distribution/src/statistics/carbonapps/Pressure/Sparkscripts_1.0.0/artifact.xml b/modules/distribution/src/statistics/carbonapps/Pressure/Sparkscripts_1.0.0/artifact.xml index 3fcf3d50..046bc619 100644 --- a/modules/distribution/src/statistics/carbonapps/Pressure/Sparkscripts_1.0.0/artifact.xml +++ b/modules/distribution/src/statistics/carbonapps/Pressure/Sparkscripts_1.0.0/artifact.xml @@ -1,4 +1,4 @@ - Gyroscope_Sensor_Script.xml + Pressure_Sensor_Script.xml From a9dcd8cd2123271d9b7bd8ac2c266c8ac4681783 Mon Sep 17 00:00:00 2001 From: charithag Date: Fri, 11 Dec 2015 22:54:17 +0530 Subject: [PATCH 20/24] Moved analytics toCDMF coomponents --- modules/distribution/pom.xml | 4 -- modules/distribution/src/assembly/bin.xml | 2 +- .../bamtoolbox/IOT_Sensor_Analytics.tbox | Bin 5538 -> 0 bytes .../EventReceiver_accelerometer.xml | 8 --- .../artifact.xml | 4 -- .../artifact.xml | 4 -- .../org_wso2_iot_devices_accelerometer.xml | 44 ------------ .../artifact.xml | 5 -- ....wso2.iot.devices.accelerometer_1.0.0.json | 20 ------ .../Accelerometer_Sensor_Script.xml | 13 ---- .../Sparkscripts_1.0.0/artifact.xml | 5 -- .../carbonapps/Accelerometer/artifacts.xml | 11 --- .../EventReceiver_battery.xml | 8 --- .../Eventreceiver_battery_1.0.0/artifact.xml | 4 -- .../Eventstore_battery_1.0.0/artifact.xml | 4 -- .../org_wso2_iot_devices_battery.xml | 44 ------------ .../Eventstream_battery_1.0.0/artifact.xml | 5 -- .../org.wso2.iot.devices.battery_1.0.0.json | 20 ------ .../Battery_Sensor_Script.xml | 13 ---- .../Battery/Sparkscripts_1.0.0/artifact.xml | 4 -- .../carbonapps/Battery/artifacts.xml | 11 --- .../EventReceiver_gps.xml | 8 --- .../GPS/Eventreceiver_gps_1.0.0/artifact.xml | 4 -- .../GPS/Eventstore_gps_1.0.0/artifact.xml | 4 -- .../org_wso2_iot_devices_gps.xml | 51 ------------- .../GPS/Eventstream_gps_1.0.0/artifact.xml | 5 -- .../org.wso2.iot.devices.gps_1.0.0.json | 23 ------ .../Sparkscripts_1.0.0/GPS_Sensor_Script.xml | 13 ---- .../GPS/Sparkscripts_1.0.0/artifact.xml | 4 -- .../statistics/carbonapps/GPS/artifacts.xml | 11 --- .../EventReceiver_gravity.xml | 8 --- .../Eventreceiver_gravaity_1.0.0/artifact.xml | 4 -- .../Eventstore_gravity_1.0.0/artifact.xml | 4 -- .../org_wso2_iot_devices_gravity.xml | 44 ------------ .../Eventstream_gravity_1.0.0/artifact.xml | 5 -- .../org.wso2.iot.devices.gravity_1.0.0.json | 20 ------ .../Gravity_Sensor_Script.xml | 13 ---- .../Gravity/Sparkscripts_1.0.0/artifact.xml | 4 -- .../carbonapps/Gravity/artifacts.xml | 11 --- .../EventReceiver_gyroscope.xml | 8 --- .../artifact.xml | 4 -- .../Eventstore_gyroscope_1.0.0/artifact.xml | 4 -- .../org_wso2_iot_devices_gyroscope.xml | 44 ------------ .../Eventstream_gyroscope_1.0.0/artifact.xml | 5 -- .../org.wso2.iot.devices.gyroscope_1.0.0.json | 20 ------ .../Gyroscope_Sensor_Script.xml | 13 ---- .../Gyroscope/Sparkscripts_1.0.0/artifact.xml | 4 -- .../carbonapps/Gyroscope/artifacts.xml | 11 --- .../EventReceiver_light.xml | 8 --- .../Eventreceiver_light_1.0.0/artifact.xml | 4 -- .../Light/Eventstore_light_1.0.0/artifact.xml | 4 -- .../org_wso2_iot_devices_light.xml | 44 ------------ .../Eventstream_light_1.0.0/artifact.xml | 5 -- .../org.wso2.iot.devices.light_1.0.0.json | 20 ------ .../Light_Sensor_Script.xml | 13 ---- .../Light/Sparkscripts_1.0.0/artifact.xml | 4 -- .../statistics/carbonapps/Light/artifacts.xml | 11 --- .../EventReceiver_magnetic.xml | 8 --- .../Eventreceiver_magnetic_1.0.0/artifact.xml | 4 -- .../Eventstore_magnetic_1.0.0/artifact.xml | 4 -- .../org_wso2_iot_devices_magnetic.xml | 44 ------------ .../Eventstream_magnetic_1.0.0/artifact.xml | 5 -- .../org.wso2.iot.devices.magnetic_1.0.0.json | 20 ------ .../Magnetic_Sensor_Script.xml | 12 ---- .../Magnetic/Sparkscripts_1.0.0/artifact.xml | 4 -- .../carbonapps/Magnetic/artifacts.xml | 11 --- .../EventReceiver_pressure.xml | 8 --- .../Eventreceiver_pressure_1.0.0/artifact.xml | 4 -- .../Eventstore_pressure_1.0.0/artifact.xml | 4 -- .../org_wso2_iot_devices_pressure.xml | 44 ------------ .../Eventstream_pressure_1.0.0/artifact.xml | 5 -- .../org.wso2.iot.devices.pressure_1.0.0.json | 20 ------ .../Pressure_Sensor_Script.xml | 13 ---- .../Pressure/Sparkscripts_1.0.0/artifact.xml | 4 -- .../carbonapps/Pressure/artifacts.xml | 11 --- .../EventReceiver_proximity.xml | 8 --- .../artifact.xml | 4 -- .../Eventstore_proximity_1.0.0/artifact.xml | 4 -- .../org_wso2_iot_devices_proximity.xml | 44 ------------ .../Eventstream_proximity_1.0.0/artifact.xml | 5 -- .../org.wso2.iot.devices.proximity_1.0.0.json | 20 ------ .../Proximity_Sensor_Script.xml | 13 ---- .../Proximity/Sparkscripts_1.0.0/artifact.xml | 4 -- .../carbonapps/Proximity/artifacts.xml | 11 --- .../EventReceiver_rotation.xml | 8 --- .../Eventreceiver_rotation_1.0.0/artifact.xml | 4 -- .../Eventstore_rotation_1.0.0/artifact.xml | 4 -- .../org_wso2_iot_devices_rotation.xml | 44 ------------ .../Eventstream_rotation_1.0.0/artifact.xml | 5 -- .../org.wso2.iot.devices.rotation_1.0.0.json | 20 ------ .../Rotation_Sensor_Script.xml | 13 ---- .../Rotation/Sparkscripts_1.0.0/artifact.xml | 4 -- .../carbonapps/Rotation/artifacts.xml | 11 --- .../EventReceiver_temperature.xml | 8 --- .../artifact.xml | 4 -- .../Eventstore_temperature_1.0.0/artifact.xml | 4 -- .../org_wso2_iot_devices_temperature.xml | 44 ------------ .../artifact.xml | 5 -- ...rg.wso2.iot.devices.temperature_1.0.0.json | 20 ------ .../Temperature_Sensor_Script.xml | 13 ---- .../Sparkscripts_1.0.0/artifact.xml | 4 -- .../Temperature_Sensor/artifacts.xml | 11 --- .../src/statistics/carbonapps/build.xml | 57 --------------- .../src/statistics/carbonapps/pom.xml | 68 ------------------ 104 files changed, 1 insertion(+), 1383 deletions(-) delete mode 100644 modules/distribution/src/statistics/bamtoolbox/IOT_Sensor_Analytics.tbox delete mode 100644 modules/distribution/src/statistics/carbonapps/Accelerometer/Eventreceiver_accelerometer_1.0.0/EventReceiver_accelerometer.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Accelerometer/Eventreceiver_accelerometer_1.0.0/artifact.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Accelerometer/Eventstore_accelerometer_1.0.0/artifact.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Accelerometer/Eventstore_accelerometer_1.0.0/org_wso2_iot_devices_accelerometer.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Accelerometer/Eventstream_accelerometer_1.0.0/artifact.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Accelerometer/Eventstream_accelerometer_1.0.0/org.wso2.iot.devices.accelerometer_1.0.0.json delete mode 100644 modules/distribution/src/statistics/carbonapps/Accelerometer/Sparkscripts_1.0.0/Accelerometer_Sensor_Script.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Accelerometer/Sparkscripts_1.0.0/artifact.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Accelerometer/artifacts.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Battery/Eventreceiver_battery_1.0.0/EventReceiver_battery.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Battery/Eventreceiver_battery_1.0.0/artifact.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Battery/Eventstore_battery_1.0.0/artifact.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Battery/Eventstore_battery_1.0.0/org_wso2_iot_devices_battery.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Battery/Eventstream_battery_1.0.0/artifact.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Battery/Eventstream_battery_1.0.0/org.wso2.iot.devices.battery_1.0.0.json delete mode 100644 modules/distribution/src/statistics/carbonapps/Battery/Sparkscripts_1.0.0/Battery_Sensor_Script.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Battery/Sparkscripts_1.0.0/artifact.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Battery/artifacts.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/GPS/Eventreceiver_gps_1.0.0/EventReceiver_gps.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/GPS/Eventreceiver_gps_1.0.0/artifact.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/GPS/Eventstore_gps_1.0.0/artifact.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/GPS/Eventstore_gps_1.0.0/org_wso2_iot_devices_gps.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/GPS/Eventstream_gps_1.0.0/artifact.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/GPS/Eventstream_gps_1.0.0/org.wso2.iot.devices.gps_1.0.0.json delete mode 100644 modules/distribution/src/statistics/carbonapps/GPS/Sparkscripts_1.0.0/GPS_Sensor_Script.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/GPS/Sparkscripts_1.0.0/artifact.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/GPS/artifacts.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Gravity/Eventreceiver_gravaity_1.0.0/EventReceiver_gravity.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Gravity/Eventreceiver_gravaity_1.0.0/artifact.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Gravity/Eventstore_gravity_1.0.0/artifact.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Gravity/Eventstore_gravity_1.0.0/org_wso2_iot_devices_gravity.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Gravity/Eventstream_gravity_1.0.0/artifact.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Gravity/Eventstream_gravity_1.0.0/org.wso2.iot.devices.gravity_1.0.0.json delete mode 100644 modules/distribution/src/statistics/carbonapps/Gravity/Sparkscripts_1.0.0/Gravity_Sensor_Script.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Gravity/Sparkscripts_1.0.0/artifact.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Gravity/artifacts.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Gyroscope/Eventreceiver_gyroscope_1.0.0/EventReceiver_gyroscope.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Gyroscope/Eventreceiver_gyroscope_1.0.0/artifact.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Gyroscope/Eventstore_gyroscope_1.0.0/artifact.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Gyroscope/Eventstore_gyroscope_1.0.0/org_wso2_iot_devices_gyroscope.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Gyroscope/Eventstream_gyroscope_1.0.0/artifact.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Gyroscope/Eventstream_gyroscope_1.0.0/org.wso2.iot.devices.gyroscope_1.0.0.json delete mode 100644 modules/distribution/src/statistics/carbonapps/Gyroscope/Sparkscripts_1.0.0/Gyroscope_Sensor_Script.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Gyroscope/Sparkscripts_1.0.0/artifact.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Gyroscope/artifacts.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Light/Eventreceiver_light_1.0.0/EventReceiver_light.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Light/Eventreceiver_light_1.0.0/artifact.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Light/Eventstore_light_1.0.0/artifact.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Light/Eventstore_light_1.0.0/org_wso2_iot_devices_light.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Light/Eventstream_light_1.0.0/artifact.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Light/Eventstream_light_1.0.0/org.wso2.iot.devices.light_1.0.0.json delete mode 100644 modules/distribution/src/statistics/carbonapps/Light/Sparkscripts_1.0.0/Light_Sensor_Script.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Light/Sparkscripts_1.0.0/artifact.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Light/artifacts.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Magnetic/Eventreceiver_magnetic_1.0.0/EventReceiver_magnetic.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Magnetic/Eventreceiver_magnetic_1.0.0/artifact.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Magnetic/Eventstore_magnetic_1.0.0/artifact.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Magnetic/Eventstore_magnetic_1.0.0/org_wso2_iot_devices_magnetic.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Magnetic/Eventstream_magnetic_1.0.0/artifact.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Magnetic/Eventstream_magnetic_1.0.0/org.wso2.iot.devices.magnetic_1.0.0.json delete mode 100644 modules/distribution/src/statistics/carbonapps/Magnetic/Sparkscripts_1.0.0/Magnetic_Sensor_Script.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Magnetic/Sparkscripts_1.0.0/artifact.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Magnetic/artifacts.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Pressure/Eventreceiver_pressure_1.0.0/EventReceiver_pressure.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Pressure/Eventreceiver_pressure_1.0.0/artifact.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Pressure/Eventstore_pressure_1.0.0/artifact.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Pressure/Eventstore_pressure_1.0.0/org_wso2_iot_devices_pressure.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Pressure/Eventstream_pressure_1.0.0/artifact.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Pressure/Eventstream_pressure_1.0.0/org.wso2.iot.devices.pressure_1.0.0.json delete mode 100644 modules/distribution/src/statistics/carbonapps/Pressure/Sparkscripts_1.0.0/Pressure_Sensor_Script.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Pressure/Sparkscripts_1.0.0/artifact.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Pressure/artifacts.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Proximity/Eventreceiver_proximity_1.0.0/EventReceiver_proximity.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Proximity/Eventreceiver_proximity_1.0.0/artifact.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Proximity/Eventstore_proximity_1.0.0/artifact.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Proximity/Eventstore_proximity_1.0.0/org_wso2_iot_devices_proximity.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Proximity/Eventstream_proximity_1.0.0/artifact.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Proximity/Eventstream_proximity_1.0.0/org.wso2.iot.devices.proximity_1.0.0.json delete mode 100644 modules/distribution/src/statistics/carbonapps/Proximity/Sparkscripts_1.0.0/Proximity_Sensor_Script.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Proximity/Sparkscripts_1.0.0/artifact.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Proximity/artifacts.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Rotation/Eventreceiver_rotation_1.0.0/EventReceiver_rotation.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Rotation/Eventreceiver_rotation_1.0.0/artifact.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Rotation/Eventstore_rotation_1.0.0/artifact.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Rotation/Eventstore_rotation_1.0.0/org_wso2_iot_devices_rotation.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Rotation/Eventstream_rotation_1.0.0/artifact.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Rotation/Eventstream_rotation_1.0.0/org.wso2.iot.devices.rotation_1.0.0.json delete mode 100644 modules/distribution/src/statistics/carbonapps/Rotation/Sparkscripts_1.0.0/Rotation_Sensor_Script.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Rotation/Sparkscripts_1.0.0/artifact.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Rotation/artifacts.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Temperature_Sensor/Eventreceiver_temperature_1.0.0/EventReceiver_temperature.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Temperature_Sensor/Eventreceiver_temperature_1.0.0/artifact.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Temperature_Sensor/Eventstore_temperature_1.0.0/artifact.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Temperature_Sensor/Eventstore_temperature_1.0.0/org_wso2_iot_devices_temperature.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Temperature_Sensor/Eventstream_temperature_1.0.0/artifact.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Temperature_Sensor/Eventstream_temperature_1.0.0/org.wso2.iot.devices.temperature_1.0.0.json delete mode 100644 modules/distribution/src/statistics/carbonapps/Temperature_Sensor/Sparkscripts_1.0.0/Temperature_Sensor_Script.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Temperature_Sensor/Sparkscripts_1.0.0/artifact.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/Temperature_Sensor/artifacts.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/build.xml delete mode 100644 modules/distribution/src/statistics/carbonapps/pom.xml diff --git a/modules/distribution/pom.xml b/modules/distribution/pom.xml index 8b4d6540..580abf65 100644 --- a/modules/distribution/pom.xml +++ b/modules/distribution/pom.xml @@ -35,10 +35,6 @@ WSO2 IoT Server - Distribution WSO2 IoT Server Distribution - - src/statistics/carbonapps - - com.h2database.wso2 diff --git a/modules/distribution/src/assembly/bin.xml b/modules/distribution/src/assembly/bin.xml index f00540d0..8bb9fb44 100644 --- a/modules/distribution/src/assembly/bin.xml +++ b/modules/distribution/src/assembly/bin.xml @@ -342,7 +342,7 @@ - src/statistics/carbonapps/target + ../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/deployment/server/carbonapps ${pom.artifactId}-${pom.version}/repository/deployment/server/carbonapps diff --git a/modules/distribution/src/statistics/bamtoolbox/IOT_Sensor_Analytics.tbox b/modules/distribution/src/statistics/bamtoolbox/IOT_Sensor_Analytics.tbox deleted file mode 100644 index 326f121ed30d91eca22e7cc26777a57e26e02c40..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5538 zcmb7|c|6qb7RSfF7NQ9GMV9RQl6~xqEo+wSV_#>+o~)^{D?7ie$u1$1B@&7(VN586 zWUsMh`KkMzbZ;)Yx#M*(f6V!O&wI}EoX_*lj$- zL*3yXFiWtzwW~kE$rjFUXg~tOqo`^(^Z~-#j|_x^zm5X};nM&g)csGoxC80_`dvEf z|4vNv`@~oQVo<&9f=YYI5|b_Pt^o+)KPUbn5dek3`8;7Bo=_OV2@3yF#dLF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;*TYV<8N4sKxn5%-)K1VCP&PWGde3kD(BEhJ+6NfiJRVTfO*rJ2LS&pfQWiFE} z{fEL=s9(;Ed%eaVZR^VThu_36{Vb2J*hTb!})~`g=m)-btS2&7YdS?Lq>_&&NZaHa#)o}&TDWF$Fo{?QcH(kp0?xSrDs4{Ncu`T zmZ;UVe<(0Kv7wL89^c-1D` zZ3NA6!L`WPZ&pWaszsf9p10#653IHU zi+Y1yPeHg8JeXuxrZ)HFvq-7CuZug$#MeGKr+Xn9QV|53o;>aYePj#80%-IpTkxzi zc}4{ev+bi+%JNFOY^}mOP64H^{ucMi3AXqvWku%j>0+P{MAwrQ7fAT=lG*H1U< zBWy%tb%f?@?OZ6#$%F`=soZ4pRFjM~T^ycLV;&tbts}*=lmFV#vb?ec+a zb~*qh9U%xLbPSyE9|QW(=`MuZ#Sj|@AeImGIY$Uk5`GEHwqeR4UY~H|cjKfPz0)j@ zidhI@zkRl@aw1K}6+GSxCT4E`Y`dwP5@J8uW1|xn(Kw|q{Ur61ci*6eG)64>o&jp` zR<9-<bNrhmYw-lz+3>+lyLoXrajnW#|h1-cJ7x9;tpE~Dz zGzx=5D{D42qATOtIB?tR*?d2|^3wpPz;rP{A7N{{i=~o!(#L*fCUoW3B<|BaHQayodegerY!1KNt8@ z`hXh+l#g(t`;`xyw*AV^B*#`hWZ?kqBkbFL?Zakgzjg(%WdHQF{;c}2^#R0>us!?5 z4||0D;%j8b7C+<|0PQ2(!hY?;vvt3=#ED~T|7OwxPjJMP-TwrK$I<>LxOwu=PjJ+5 b0(6fUOu7&PVC{fF - - - false - - - - diff --git a/modules/distribution/src/statistics/carbonapps/Accelerometer/Eventreceiver_accelerometer_1.0.0/artifact.xml b/modules/distribution/src/statistics/carbonapps/Accelerometer/Eventreceiver_accelerometer_1.0.0/artifact.xml deleted file mode 100644 index 0875edb2..00000000 --- a/modules/distribution/src/statistics/carbonapps/Accelerometer/Eventreceiver_accelerometer_1.0.0/artifact.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - EventReceiver_accelerometer.xml - diff --git a/modules/distribution/src/statistics/carbonapps/Accelerometer/Eventstore_accelerometer_1.0.0/artifact.xml b/modules/distribution/src/statistics/carbonapps/Accelerometer/Eventstore_accelerometer_1.0.0/artifact.xml deleted file mode 100644 index 9e6f1e84..00000000 --- a/modules/distribution/src/statistics/carbonapps/Accelerometer/Eventstore_accelerometer_1.0.0/artifact.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - org_wso2_iot_devices_accelerometer.xml - diff --git a/modules/distribution/src/statistics/carbonapps/Accelerometer/Eventstore_accelerometer_1.0.0/org_wso2_iot_devices_accelerometer.xml b/modules/distribution/src/statistics/carbonapps/Accelerometer/Eventstore_accelerometer_1.0.0/org_wso2_iot_devices_accelerometer.xml deleted file mode 100644 index 3312516e..00000000 --- a/modules/distribution/src/statistics/carbonapps/Accelerometer/Eventstore_accelerometer_1.0.0/org_wso2_iot_devices_accelerometer.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - org.wso2.iot.devices.accelerometer:1.0.0 - - EVENT_STORE - - - meta_owner - true - true - false - STRING - - - meta_deviceType - true - true - false - STRING - - - meta_deviceId - true - true - false - STRING - - - meta_time - true - true - false - LONG - - - accelerometer - false - false - false - FLOAT - - - \ No newline at end of file diff --git a/modules/distribution/src/statistics/carbonapps/Accelerometer/Eventstream_accelerometer_1.0.0/artifact.xml b/modules/distribution/src/statistics/carbonapps/Accelerometer/Eventstream_accelerometer_1.0.0/artifact.xml deleted file mode 100644 index 94cfa5d3..00000000 --- a/modules/distribution/src/statistics/carbonapps/Accelerometer/Eventstream_accelerometer_1.0.0/artifact.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - org.wso2.iot.devices.accelerometer_1.0.0.json - - diff --git a/modules/distribution/src/statistics/carbonapps/Accelerometer/Eventstream_accelerometer_1.0.0/org.wso2.iot.devices.accelerometer_1.0.0.json b/modules/distribution/src/statistics/carbonapps/Accelerometer/Eventstream_accelerometer_1.0.0/org.wso2.iot.devices.accelerometer_1.0.0.json deleted file mode 100644 index db6af8ee..00000000 --- a/modules/distribution/src/statistics/carbonapps/Accelerometer/Eventstream_accelerometer_1.0.0/org.wso2.iot.devices.accelerometer_1.0.0.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "org.wso2.iot.devices.accelerometer", - "version": "1.0.0", - "nickName": "accelerometer Data", - "description": "accelerometer data received from the Device", - "metaData": [ - {"name":"owner","type":"STRING"}, - {"name":"deviceType","type":"STRING"}, - {"name":"deviceId","type":"STRING"}, - {"name":"time","type":"LONG"} - ], - "payloadData": [ - { - "name": "accelerometer","type": "FLOAT" - } - ] -} - - - diff --git a/modules/distribution/src/statistics/carbonapps/Accelerometer/Sparkscripts_1.0.0/Accelerometer_Sensor_Script.xml b/modules/distribution/src/statistics/carbonapps/Accelerometer/Sparkscripts_1.0.0/Accelerometer_Sensor_Script.xml deleted file mode 100644 index 80cf89b5..00000000 --- a/modules/distribution/src/statistics/carbonapps/Accelerometer/Sparkscripts_1.0.0/Accelerometer_Sensor_Script.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - Accelerometer_Sensor_Script - - 0 * * * * ? - diff --git a/modules/distribution/src/statistics/carbonapps/Accelerometer/Sparkscripts_1.0.0/artifact.xml b/modules/distribution/src/statistics/carbonapps/Accelerometer/Sparkscripts_1.0.0/artifact.xml deleted file mode 100644 index 9c88d819..00000000 --- a/modules/distribution/src/statistics/carbonapps/Accelerometer/Sparkscripts_1.0.0/artifact.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - Accelerometer_Sensor_Script.xml - - diff --git a/modules/distribution/src/statistics/carbonapps/Accelerometer/artifacts.xml b/modules/distribution/src/statistics/carbonapps/Accelerometer/artifacts.xml deleted file mode 100644 index 88a8d5f5..00000000 --- a/modules/distribution/src/statistics/carbonapps/Accelerometer/artifacts.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/modules/distribution/src/statistics/carbonapps/Battery/Eventreceiver_battery_1.0.0/EventReceiver_battery.xml b/modules/distribution/src/statistics/carbonapps/Battery/Eventreceiver_battery_1.0.0/EventReceiver_battery.xml deleted file mode 100644 index 640da303..00000000 --- a/modules/distribution/src/statistics/carbonapps/Battery/Eventreceiver_battery_1.0.0/EventReceiver_battery.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - false - - - - diff --git a/modules/distribution/src/statistics/carbonapps/Battery/Eventreceiver_battery_1.0.0/artifact.xml b/modules/distribution/src/statistics/carbonapps/Battery/Eventreceiver_battery_1.0.0/artifact.xml deleted file mode 100644 index 00f6cbca..00000000 --- a/modules/distribution/src/statistics/carbonapps/Battery/Eventreceiver_battery_1.0.0/artifact.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - EventReceiver_battery.xml - diff --git a/modules/distribution/src/statistics/carbonapps/Battery/Eventstore_battery_1.0.0/artifact.xml b/modules/distribution/src/statistics/carbonapps/Battery/Eventstore_battery_1.0.0/artifact.xml deleted file mode 100644 index 1ab97be0..00000000 --- a/modules/distribution/src/statistics/carbonapps/Battery/Eventstore_battery_1.0.0/artifact.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - org_wso2_iot_devices_battery.xml - diff --git a/modules/distribution/src/statistics/carbonapps/Battery/Eventstore_battery_1.0.0/org_wso2_iot_devices_battery.xml b/modules/distribution/src/statistics/carbonapps/Battery/Eventstore_battery_1.0.0/org_wso2_iot_devices_battery.xml deleted file mode 100644 index 6f40ebb5..00000000 --- a/modules/distribution/src/statistics/carbonapps/Battery/Eventstore_battery_1.0.0/org_wso2_iot_devices_battery.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - org.wso2.iot.devices.battery:1.0.0 - - EVENT_STORE - - - meta_owner - true - true - false - STRING - - - meta_deviceType - true - true - false - STRING - - - meta_deviceId - true - true - false - STRING - - - meta_time - true - true - false - LONG - - - battery - false - false - false - FLOAT - - - \ No newline at end of file diff --git a/modules/distribution/src/statistics/carbonapps/Battery/Eventstream_battery_1.0.0/artifact.xml b/modules/distribution/src/statistics/carbonapps/Battery/Eventstream_battery_1.0.0/artifact.xml deleted file mode 100644 index f3451427..00000000 --- a/modules/distribution/src/statistics/carbonapps/Battery/Eventstream_battery_1.0.0/artifact.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - org.wso2.iot.devices.battery_1.0.0.json - - diff --git a/modules/distribution/src/statistics/carbonapps/Battery/Eventstream_battery_1.0.0/org.wso2.iot.devices.battery_1.0.0.json b/modules/distribution/src/statistics/carbonapps/Battery/Eventstream_battery_1.0.0/org.wso2.iot.devices.battery_1.0.0.json deleted file mode 100644 index c0a2106f..00000000 --- a/modules/distribution/src/statistics/carbonapps/Battery/Eventstream_battery_1.0.0/org.wso2.iot.devices.battery_1.0.0.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "org.wso2.iot.devices.battery", - "version": "1.0.0", - "nickName": "battery Data", - "description": "battery data received from the Device", - "metaData": [ - {"name":"owner","type":"STRING"}, - {"name":"deviceType","type":"STRING"}, - {"name":"deviceId","type":"STRING"}, - {"name":"time","type":"LONG"} - ], - "payloadData": [ - { - "name": "battery","type": "FLOAT" - } - ] -} - - - diff --git a/modules/distribution/src/statistics/carbonapps/Battery/Sparkscripts_1.0.0/Battery_Sensor_Script.xml b/modules/distribution/src/statistics/carbonapps/Battery/Sparkscripts_1.0.0/Battery_Sensor_Script.xml deleted file mode 100644 index 005ab010..00000000 --- a/modules/distribution/src/statistics/carbonapps/Battery/Sparkscripts_1.0.0/Battery_Sensor_Script.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - Battery_Sensor_Script - - 0 * * * * ? - diff --git a/modules/distribution/src/statistics/carbonapps/Battery/Sparkscripts_1.0.0/artifact.xml b/modules/distribution/src/statistics/carbonapps/Battery/Sparkscripts_1.0.0/artifact.xml deleted file mode 100644 index 1a1ad956..00000000 --- a/modules/distribution/src/statistics/carbonapps/Battery/Sparkscripts_1.0.0/artifact.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - Battery_Sensor_Script.xml - diff --git a/modules/distribution/src/statistics/carbonapps/Battery/artifacts.xml b/modules/distribution/src/statistics/carbonapps/Battery/artifacts.xml deleted file mode 100644 index b5514bd6..00000000 --- a/modules/distribution/src/statistics/carbonapps/Battery/artifacts.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/modules/distribution/src/statistics/carbonapps/GPS/Eventreceiver_gps_1.0.0/EventReceiver_gps.xml b/modules/distribution/src/statistics/carbonapps/GPS/Eventreceiver_gps_1.0.0/EventReceiver_gps.xml deleted file mode 100644 index acda8f1a..00000000 --- a/modules/distribution/src/statistics/carbonapps/GPS/Eventreceiver_gps_1.0.0/EventReceiver_gps.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - false - - - - diff --git a/modules/distribution/src/statistics/carbonapps/GPS/Eventreceiver_gps_1.0.0/artifact.xml b/modules/distribution/src/statistics/carbonapps/GPS/Eventreceiver_gps_1.0.0/artifact.xml deleted file mode 100644 index da4b5802..00000000 --- a/modules/distribution/src/statistics/carbonapps/GPS/Eventreceiver_gps_1.0.0/artifact.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - EventReceiver_gps.xml - diff --git a/modules/distribution/src/statistics/carbonapps/GPS/Eventstore_gps_1.0.0/artifact.xml b/modules/distribution/src/statistics/carbonapps/GPS/Eventstore_gps_1.0.0/artifact.xml deleted file mode 100644 index 04fe1f05..00000000 --- a/modules/distribution/src/statistics/carbonapps/GPS/Eventstore_gps_1.0.0/artifact.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - org_wso2_iot_devices_gps.xml - diff --git a/modules/distribution/src/statistics/carbonapps/GPS/Eventstore_gps_1.0.0/org_wso2_iot_devices_gps.xml b/modules/distribution/src/statistics/carbonapps/GPS/Eventstore_gps_1.0.0/org_wso2_iot_devices_gps.xml deleted file mode 100644 index 98de2ba9..00000000 --- a/modules/distribution/src/statistics/carbonapps/GPS/Eventstore_gps_1.0.0/org_wso2_iot_devices_gps.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - org.wso2.iot.devices.gps:1.0.0 - - EVENT_STORE - - - meta_owner - true - true - false - STRING - - - meta_deviceType - true - true - false - STRING - - - meta_deviceId - true - true - false - STRING - - - meta_time - true - true - false - LONG - - - latitude - false - false - false - FLOAT - - - longitude - false - false - false - FLOAT - - - \ No newline at end of file diff --git a/modules/distribution/src/statistics/carbonapps/GPS/Eventstream_gps_1.0.0/artifact.xml b/modules/distribution/src/statistics/carbonapps/GPS/Eventstream_gps_1.0.0/artifact.xml deleted file mode 100644 index 5d0432ee..00000000 --- a/modules/distribution/src/statistics/carbonapps/GPS/Eventstream_gps_1.0.0/artifact.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - org.wso2.iot.devices.gps_1.0.0.json - - diff --git a/modules/distribution/src/statistics/carbonapps/GPS/Eventstream_gps_1.0.0/org.wso2.iot.devices.gps_1.0.0.json b/modules/distribution/src/statistics/carbonapps/GPS/Eventstream_gps_1.0.0/org.wso2.iot.devices.gps_1.0.0.json deleted file mode 100644 index 04d2b106..00000000 --- a/modules/distribution/src/statistics/carbonapps/GPS/Eventstream_gps_1.0.0/org.wso2.iot.devices.gps_1.0.0.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "org.wso2.iot.devices.gps", - "version": "1.0.0", - "nickName": "GPS Data", - "description": "GPS data received from the Device", - "metaData": [ - {"name":"owner","type":"STRING"}, - {"name":"deviceType","type":"STRING"}, - {"name":"deviceId","type":"STRING"}, - {"name":"time","type":"LONG"} - ], - "payloadData": [ - { - "name": "latitude","type": "FLOAT" - }, - { - "name": "longitude","type": "FLOAT" - } - ] -} - - - diff --git a/modules/distribution/src/statistics/carbonapps/GPS/Sparkscripts_1.0.0/GPS_Sensor_Script.xml b/modules/distribution/src/statistics/carbonapps/GPS/Sparkscripts_1.0.0/GPS_Sensor_Script.xml deleted file mode 100644 index 8d67f805..00000000 --- a/modules/distribution/src/statistics/carbonapps/GPS/Sparkscripts_1.0.0/GPS_Sensor_Script.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - IoTServer_Sensor_Script - - 0 * * * * ? - diff --git a/modules/distribution/src/statistics/carbonapps/GPS/Sparkscripts_1.0.0/artifact.xml b/modules/distribution/src/statistics/carbonapps/GPS/Sparkscripts_1.0.0/artifact.xml deleted file mode 100644 index 19a4f36d..00000000 --- a/modules/distribution/src/statistics/carbonapps/GPS/Sparkscripts_1.0.0/artifact.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - GPS_Sensor_Script.xml - diff --git a/modules/distribution/src/statistics/carbonapps/GPS/artifacts.xml b/modules/distribution/src/statistics/carbonapps/GPS/artifacts.xml deleted file mode 100644 index 8bf3d37c..00000000 --- a/modules/distribution/src/statistics/carbonapps/GPS/artifacts.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/modules/distribution/src/statistics/carbonapps/Gravity/Eventreceiver_gravaity_1.0.0/EventReceiver_gravity.xml b/modules/distribution/src/statistics/carbonapps/Gravity/Eventreceiver_gravaity_1.0.0/EventReceiver_gravity.xml deleted file mode 100644 index 86efcbfb..00000000 --- a/modules/distribution/src/statistics/carbonapps/Gravity/Eventreceiver_gravaity_1.0.0/EventReceiver_gravity.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - false - - - - diff --git a/modules/distribution/src/statistics/carbonapps/Gravity/Eventreceiver_gravaity_1.0.0/artifact.xml b/modules/distribution/src/statistics/carbonapps/Gravity/Eventreceiver_gravaity_1.0.0/artifact.xml deleted file mode 100644 index e150a5c6..00000000 --- a/modules/distribution/src/statistics/carbonapps/Gravity/Eventreceiver_gravaity_1.0.0/artifact.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - EventReceiver_gravity.xml - diff --git a/modules/distribution/src/statistics/carbonapps/Gravity/Eventstore_gravity_1.0.0/artifact.xml b/modules/distribution/src/statistics/carbonapps/Gravity/Eventstore_gravity_1.0.0/artifact.xml deleted file mode 100644 index d54e89a9..00000000 --- a/modules/distribution/src/statistics/carbonapps/Gravity/Eventstore_gravity_1.0.0/artifact.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - org_wso2_iot_devices_gravity.xml - diff --git a/modules/distribution/src/statistics/carbonapps/Gravity/Eventstore_gravity_1.0.0/org_wso2_iot_devices_gravity.xml b/modules/distribution/src/statistics/carbonapps/Gravity/Eventstore_gravity_1.0.0/org_wso2_iot_devices_gravity.xml deleted file mode 100644 index 3a575434..00000000 --- a/modules/distribution/src/statistics/carbonapps/Gravity/Eventstore_gravity_1.0.0/org_wso2_iot_devices_gravity.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - org.wso2.iot.devices.gravity:1.0.0 - - EVENT_STORE - - - meta_owner - true - true - false - STRING - - - meta_deviceType - true - true - false - STRING - - - meta_deviceId - true - true - false - STRING - - - meta_time - true - true - false - LONG - - - gravity - false - false - false - FLOAT - - - \ No newline at end of file diff --git a/modules/distribution/src/statistics/carbonapps/Gravity/Eventstream_gravity_1.0.0/artifact.xml b/modules/distribution/src/statistics/carbonapps/Gravity/Eventstream_gravity_1.0.0/artifact.xml deleted file mode 100644 index 2953fd5b..00000000 --- a/modules/distribution/src/statistics/carbonapps/Gravity/Eventstream_gravity_1.0.0/artifact.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - org.wso2.iot.devices.gravity_1.0.0.json - - diff --git a/modules/distribution/src/statistics/carbonapps/Gravity/Eventstream_gravity_1.0.0/org.wso2.iot.devices.gravity_1.0.0.json b/modules/distribution/src/statistics/carbonapps/Gravity/Eventstream_gravity_1.0.0/org.wso2.iot.devices.gravity_1.0.0.json deleted file mode 100644 index f18bd87b..00000000 --- a/modules/distribution/src/statistics/carbonapps/Gravity/Eventstream_gravity_1.0.0/org.wso2.iot.devices.gravity_1.0.0.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "org.wso2.iot.devices.gravity", - "version": "1.0.0", - "nickName": "Gravity Data", - "description": "Gravity data received from the Device", - "metaData": [ - {"name":"owner","type":"STRING"}, - {"name":"deviceType","type":"STRING"}, - {"name":"deviceId","type":"STRING"}, - {"name":"time","type":"LONG"} - ], - "payloadData": [ - { - "name": "gravity","type": "FLOAT" - } - ] -} - - - diff --git a/modules/distribution/src/statistics/carbonapps/Gravity/Sparkscripts_1.0.0/Gravity_Sensor_Script.xml b/modules/distribution/src/statistics/carbonapps/Gravity/Sparkscripts_1.0.0/Gravity_Sensor_Script.xml deleted file mode 100644 index 34bcb8d0..00000000 --- a/modules/distribution/src/statistics/carbonapps/Gravity/Sparkscripts_1.0.0/Gravity_Sensor_Script.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - IoTServer_Sensor_Script - - 0 * * * * ? - diff --git a/modules/distribution/src/statistics/carbonapps/Gravity/Sparkscripts_1.0.0/artifact.xml b/modules/distribution/src/statistics/carbonapps/Gravity/Sparkscripts_1.0.0/artifact.xml deleted file mode 100644 index 0d5f122e..00000000 --- a/modules/distribution/src/statistics/carbonapps/Gravity/Sparkscripts_1.0.0/artifact.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - Gravity_Sensor_Script.xml - diff --git a/modules/distribution/src/statistics/carbonapps/Gravity/artifacts.xml b/modules/distribution/src/statistics/carbonapps/Gravity/artifacts.xml deleted file mode 100644 index 1a9e815e..00000000 --- a/modules/distribution/src/statistics/carbonapps/Gravity/artifacts.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/modules/distribution/src/statistics/carbonapps/Gyroscope/Eventreceiver_gyroscope_1.0.0/EventReceiver_gyroscope.xml b/modules/distribution/src/statistics/carbonapps/Gyroscope/Eventreceiver_gyroscope_1.0.0/EventReceiver_gyroscope.xml deleted file mode 100644 index f5aa74ea..00000000 --- a/modules/distribution/src/statistics/carbonapps/Gyroscope/Eventreceiver_gyroscope_1.0.0/EventReceiver_gyroscope.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - false - - - - diff --git a/modules/distribution/src/statistics/carbonapps/Gyroscope/Eventreceiver_gyroscope_1.0.0/artifact.xml b/modules/distribution/src/statistics/carbonapps/Gyroscope/Eventreceiver_gyroscope_1.0.0/artifact.xml deleted file mode 100644 index 4d4a7b91..00000000 --- a/modules/distribution/src/statistics/carbonapps/Gyroscope/Eventreceiver_gyroscope_1.0.0/artifact.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - EventReceiver_gyroscope.xml - diff --git a/modules/distribution/src/statistics/carbonapps/Gyroscope/Eventstore_gyroscope_1.0.0/artifact.xml b/modules/distribution/src/statistics/carbonapps/Gyroscope/Eventstore_gyroscope_1.0.0/artifact.xml deleted file mode 100644 index 73fbde21..00000000 --- a/modules/distribution/src/statistics/carbonapps/Gyroscope/Eventstore_gyroscope_1.0.0/artifact.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - org_wso2_iot_devices_gyroscope.xml - diff --git a/modules/distribution/src/statistics/carbonapps/Gyroscope/Eventstore_gyroscope_1.0.0/org_wso2_iot_devices_gyroscope.xml b/modules/distribution/src/statistics/carbonapps/Gyroscope/Eventstore_gyroscope_1.0.0/org_wso2_iot_devices_gyroscope.xml deleted file mode 100644 index 603711c1..00000000 --- a/modules/distribution/src/statistics/carbonapps/Gyroscope/Eventstore_gyroscope_1.0.0/org_wso2_iot_devices_gyroscope.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - org.wso2.iot.devices.gyroscope:1.0.0 - - EVENT_STORE - - - meta_owner - true - true - false - STRING - - - meta_deviceType - true - true - false - STRING - - - meta_deviceId - true - true - false - STRING - - - meta_time - true - true - false - LONG - - - gyroscope - false - false - false - FLOAT - - - \ No newline at end of file diff --git a/modules/distribution/src/statistics/carbonapps/Gyroscope/Eventstream_gyroscope_1.0.0/artifact.xml b/modules/distribution/src/statistics/carbonapps/Gyroscope/Eventstream_gyroscope_1.0.0/artifact.xml deleted file mode 100644 index e09e166e..00000000 --- a/modules/distribution/src/statistics/carbonapps/Gyroscope/Eventstream_gyroscope_1.0.0/artifact.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - org.wso2.iot.devices.gyroscope_1.0.0.json - - diff --git a/modules/distribution/src/statistics/carbonapps/Gyroscope/Eventstream_gyroscope_1.0.0/org.wso2.iot.devices.gyroscope_1.0.0.json b/modules/distribution/src/statistics/carbonapps/Gyroscope/Eventstream_gyroscope_1.0.0/org.wso2.iot.devices.gyroscope_1.0.0.json deleted file mode 100644 index 0583da29..00000000 --- a/modules/distribution/src/statistics/carbonapps/Gyroscope/Eventstream_gyroscope_1.0.0/org.wso2.iot.devices.gyroscope_1.0.0.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "org.wso2.iot.devices.gyroscope", - "version": "1.0.0", - "nickName": "Gyroscope Data", - "description": "Gyroscope data received from the Device", - "metaData": [ - {"name":"owner","type":"STRING"}, - {"name":"deviceType","type":"STRING"}, - {"name":"deviceId","type":"STRING"}, - {"name":"time","type":"LONG"} - ], - "payloadData": [ - { - "name": "gyroscope","type": "FLOAT" - } - ] -} - - - diff --git a/modules/distribution/src/statistics/carbonapps/Gyroscope/Sparkscripts_1.0.0/Gyroscope_Sensor_Script.xml b/modules/distribution/src/statistics/carbonapps/Gyroscope/Sparkscripts_1.0.0/Gyroscope_Sensor_Script.xml deleted file mode 100644 index f26032cf..00000000 --- a/modules/distribution/src/statistics/carbonapps/Gyroscope/Sparkscripts_1.0.0/Gyroscope_Sensor_Script.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - IoTServer_Sensor_Script - - 0 * * * * ? - diff --git a/modules/distribution/src/statistics/carbonapps/Gyroscope/Sparkscripts_1.0.0/artifact.xml b/modules/distribution/src/statistics/carbonapps/Gyroscope/Sparkscripts_1.0.0/artifact.xml deleted file mode 100644 index 3fcf3d50..00000000 --- a/modules/distribution/src/statistics/carbonapps/Gyroscope/Sparkscripts_1.0.0/artifact.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - Gyroscope_Sensor_Script.xml - diff --git a/modules/distribution/src/statistics/carbonapps/Gyroscope/artifacts.xml b/modules/distribution/src/statistics/carbonapps/Gyroscope/artifacts.xml deleted file mode 100644 index 6a3ea818..00000000 --- a/modules/distribution/src/statistics/carbonapps/Gyroscope/artifacts.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/modules/distribution/src/statistics/carbonapps/Light/Eventreceiver_light_1.0.0/EventReceiver_light.xml b/modules/distribution/src/statistics/carbonapps/Light/Eventreceiver_light_1.0.0/EventReceiver_light.xml deleted file mode 100644 index ef4ec04d..00000000 --- a/modules/distribution/src/statistics/carbonapps/Light/Eventreceiver_light_1.0.0/EventReceiver_light.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - false - - - - diff --git a/modules/distribution/src/statistics/carbonapps/Light/Eventreceiver_light_1.0.0/artifact.xml b/modules/distribution/src/statistics/carbonapps/Light/Eventreceiver_light_1.0.0/artifact.xml deleted file mode 100644 index a7d13f8d..00000000 --- a/modules/distribution/src/statistics/carbonapps/Light/Eventreceiver_light_1.0.0/artifact.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - EventReceiver_light.xml - diff --git a/modules/distribution/src/statistics/carbonapps/Light/Eventstore_light_1.0.0/artifact.xml b/modules/distribution/src/statistics/carbonapps/Light/Eventstore_light_1.0.0/artifact.xml deleted file mode 100644 index b424b32d..00000000 --- a/modules/distribution/src/statistics/carbonapps/Light/Eventstore_light_1.0.0/artifact.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - org_wso2_iot_devices_light.xml - diff --git a/modules/distribution/src/statistics/carbonapps/Light/Eventstore_light_1.0.0/org_wso2_iot_devices_light.xml b/modules/distribution/src/statistics/carbonapps/Light/Eventstore_light_1.0.0/org_wso2_iot_devices_light.xml deleted file mode 100644 index 4ccd871b..00000000 --- a/modules/distribution/src/statistics/carbonapps/Light/Eventstore_light_1.0.0/org_wso2_iot_devices_light.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - org.wso2.iot.devices.light:1.0.0 - - EVENT_STORE - - - meta_owner - true - true - false - STRING - - - meta_deviceType - true - true - false - STRING - - - meta_deviceId - true - true - false - STRING - - - meta_time - true - true - false - LONG - - - light - false - false - false - FLOAT - - - \ No newline at end of file diff --git a/modules/distribution/src/statistics/carbonapps/Light/Eventstream_light_1.0.0/artifact.xml b/modules/distribution/src/statistics/carbonapps/Light/Eventstream_light_1.0.0/artifact.xml deleted file mode 100644 index 39d09aff..00000000 --- a/modules/distribution/src/statistics/carbonapps/Light/Eventstream_light_1.0.0/artifact.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - org.wso2.iot.devices.light_1.0.0.json - - diff --git a/modules/distribution/src/statistics/carbonapps/Light/Eventstream_light_1.0.0/org.wso2.iot.devices.light_1.0.0.json b/modules/distribution/src/statistics/carbonapps/Light/Eventstream_light_1.0.0/org.wso2.iot.devices.light_1.0.0.json deleted file mode 100644 index 253f0b0c..00000000 --- a/modules/distribution/src/statistics/carbonapps/Light/Eventstream_light_1.0.0/org.wso2.iot.devices.light_1.0.0.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "org.wso2.iot.devices.light", - "version": "1.0.0", - "nickName": "light Data", - "description": "light data received from the Device", - "metaData": [ - {"name":"owner","type":"STRING"}, - {"name":"deviceType","type":"STRING"}, - {"name":"deviceId","type":"STRING"}, - {"name":"time","type":"LONG"} - ], - "payloadData": [ - { - "name": "light","type": "FLOAT" - } - ] -} - - - diff --git a/modules/distribution/src/statistics/carbonapps/Light/Sparkscripts_1.0.0/Light_Sensor_Script.xml b/modules/distribution/src/statistics/carbonapps/Light/Sparkscripts_1.0.0/Light_Sensor_Script.xml deleted file mode 100644 index 930fd26e..00000000 --- a/modules/distribution/src/statistics/carbonapps/Light/Sparkscripts_1.0.0/Light_Sensor_Script.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - Light_Sensor_Script - - 0 * * * * ? - diff --git a/modules/distribution/src/statistics/carbonapps/Light/Sparkscripts_1.0.0/artifact.xml b/modules/distribution/src/statistics/carbonapps/Light/Sparkscripts_1.0.0/artifact.xml deleted file mode 100644 index 30953886..00000000 --- a/modules/distribution/src/statistics/carbonapps/Light/Sparkscripts_1.0.0/artifact.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - Light_Sensor_Script.xml - diff --git a/modules/distribution/src/statistics/carbonapps/Light/artifacts.xml b/modules/distribution/src/statistics/carbonapps/Light/artifacts.xml deleted file mode 100644 index 79bc08b5..00000000 --- a/modules/distribution/src/statistics/carbonapps/Light/artifacts.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/modules/distribution/src/statistics/carbonapps/Magnetic/Eventreceiver_magnetic_1.0.0/EventReceiver_magnetic.xml b/modules/distribution/src/statistics/carbonapps/Magnetic/Eventreceiver_magnetic_1.0.0/EventReceiver_magnetic.xml deleted file mode 100644 index 22e8e22f..00000000 --- a/modules/distribution/src/statistics/carbonapps/Magnetic/Eventreceiver_magnetic_1.0.0/EventReceiver_magnetic.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - false - - - - diff --git a/modules/distribution/src/statistics/carbonapps/Magnetic/Eventreceiver_magnetic_1.0.0/artifact.xml b/modules/distribution/src/statistics/carbonapps/Magnetic/Eventreceiver_magnetic_1.0.0/artifact.xml deleted file mode 100644 index 2d595f4f..00000000 --- a/modules/distribution/src/statistics/carbonapps/Magnetic/Eventreceiver_magnetic_1.0.0/artifact.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - EventReceiver_magnetic.xml - diff --git a/modules/distribution/src/statistics/carbonapps/Magnetic/Eventstore_magnetic_1.0.0/artifact.xml b/modules/distribution/src/statistics/carbonapps/Magnetic/Eventstore_magnetic_1.0.0/artifact.xml deleted file mode 100644 index d84e3fea..00000000 --- a/modules/distribution/src/statistics/carbonapps/Magnetic/Eventstore_magnetic_1.0.0/artifact.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - org_wso2_iot_devices_magnetic.xml - diff --git a/modules/distribution/src/statistics/carbonapps/Magnetic/Eventstore_magnetic_1.0.0/org_wso2_iot_devices_magnetic.xml b/modules/distribution/src/statistics/carbonapps/Magnetic/Eventstore_magnetic_1.0.0/org_wso2_iot_devices_magnetic.xml deleted file mode 100644 index eefb1fb0..00000000 --- a/modules/distribution/src/statistics/carbonapps/Magnetic/Eventstore_magnetic_1.0.0/org_wso2_iot_devices_magnetic.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - org.wso2.iot.devices.magnetic:1.0.0 - - EVENT_STORE - - - meta_owner - true - true - false - STRING - - - meta_deviceType - true - true - false - STRING - - - meta_deviceId - true - true - false - STRING - - - meta_time - true - true - false - LONG - - - magnetic - false - false - false - FLOAT - - - \ No newline at end of file diff --git a/modules/distribution/src/statistics/carbonapps/Magnetic/Eventstream_magnetic_1.0.0/artifact.xml b/modules/distribution/src/statistics/carbonapps/Magnetic/Eventstream_magnetic_1.0.0/artifact.xml deleted file mode 100644 index 2d071139..00000000 --- a/modules/distribution/src/statistics/carbonapps/Magnetic/Eventstream_magnetic_1.0.0/artifact.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - org.wso2.iot.devices.magnetic_1.0.0.json - - diff --git a/modules/distribution/src/statistics/carbonapps/Magnetic/Eventstream_magnetic_1.0.0/org.wso2.iot.devices.magnetic_1.0.0.json b/modules/distribution/src/statistics/carbonapps/Magnetic/Eventstream_magnetic_1.0.0/org.wso2.iot.devices.magnetic_1.0.0.json deleted file mode 100644 index 5cbe22ba..00000000 --- a/modules/distribution/src/statistics/carbonapps/Magnetic/Eventstream_magnetic_1.0.0/org.wso2.iot.devices.magnetic_1.0.0.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "org.wso2.iot.devices.magnetic", - "version": "1.0.0", - "nickName": "magnetic Data", - "description": "magnetic data received from the Device", - "metaData": [ - {"name":"owner","type":"STRING"}, - {"name":"deviceType","type":"STRING"}, - {"name":"deviceId","type":"STRING"}, - {"name":"time","type":"LONG"} - ], - "payloadData": [ - { - "name": "magnetic","type": "FLOAT" - } - ] -} - - - diff --git a/modules/distribution/src/statistics/carbonapps/Magnetic/Sparkscripts_1.0.0/Magnetic_Sensor_Script.xml b/modules/distribution/src/statistics/carbonapps/Magnetic/Sparkscripts_1.0.0/Magnetic_Sensor_Script.xml deleted file mode 100644 index 7df6931e..00000000 --- a/modules/distribution/src/statistics/carbonapps/Magnetic/Sparkscripts_1.0.0/Magnetic_Sensor_Script.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - IoTServer_Sensor_Script - - 0 * * * * ? - diff --git a/modules/distribution/src/statistics/carbonapps/Magnetic/Sparkscripts_1.0.0/artifact.xml b/modules/distribution/src/statistics/carbonapps/Magnetic/Sparkscripts_1.0.0/artifact.xml deleted file mode 100644 index 81a49e1f..00000000 --- a/modules/distribution/src/statistics/carbonapps/Magnetic/Sparkscripts_1.0.0/artifact.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - Magnetic_Sensor_Script.xml - diff --git a/modules/distribution/src/statistics/carbonapps/Magnetic/artifacts.xml b/modules/distribution/src/statistics/carbonapps/Magnetic/artifacts.xml deleted file mode 100644 index 8c013b5d..00000000 --- a/modules/distribution/src/statistics/carbonapps/Magnetic/artifacts.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/modules/distribution/src/statistics/carbonapps/Pressure/Eventreceiver_pressure_1.0.0/EventReceiver_pressure.xml b/modules/distribution/src/statistics/carbonapps/Pressure/Eventreceiver_pressure_1.0.0/EventReceiver_pressure.xml deleted file mode 100644 index 76ac8619..00000000 --- a/modules/distribution/src/statistics/carbonapps/Pressure/Eventreceiver_pressure_1.0.0/EventReceiver_pressure.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - false - - - - diff --git a/modules/distribution/src/statistics/carbonapps/Pressure/Eventreceiver_pressure_1.0.0/artifact.xml b/modules/distribution/src/statistics/carbonapps/Pressure/Eventreceiver_pressure_1.0.0/artifact.xml deleted file mode 100644 index c611037c..00000000 --- a/modules/distribution/src/statistics/carbonapps/Pressure/Eventreceiver_pressure_1.0.0/artifact.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - EventReceiver_pressure.xml - diff --git a/modules/distribution/src/statistics/carbonapps/Pressure/Eventstore_pressure_1.0.0/artifact.xml b/modules/distribution/src/statistics/carbonapps/Pressure/Eventstore_pressure_1.0.0/artifact.xml deleted file mode 100644 index dfae64f1..00000000 --- a/modules/distribution/src/statistics/carbonapps/Pressure/Eventstore_pressure_1.0.0/artifact.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - org_wso2_iot_devices_pressure.xml - diff --git a/modules/distribution/src/statistics/carbonapps/Pressure/Eventstore_pressure_1.0.0/org_wso2_iot_devices_pressure.xml b/modules/distribution/src/statistics/carbonapps/Pressure/Eventstore_pressure_1.0.0/org_wso2_iot_devices_pressure.xml deleted file mode 100644 index 2533da29..00000000 --- a/modules/distribution/src/statistics/carbonapps/Pressure/Eventstore_pressure_1.0.0/org_wso2_iot_devices_pressure.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - org.wso2.iot.devices.pressure:1.0.0 - - EVENT_STORE - - - meta_owner - true - true - false - STRING - - - meta_deviceType - true - true - false - STRING - - - meta_deviceId - true - true - false - STRING - - - meta_time - true - true - false - LONG - - - pressure - false - false - false - FLOAT - - - \ No newline at end of file diff --git a/modules/distribution/src/statistics/carbonapps/Pressure/Eventstream_pressure_1.0.0/artifact.xml b/modules/distribution/src/statistics/carbonapps/Pressure/Eventstream_pressure_1.0.0/artifact.xml deleted file mode 100644 index 2a2f8868..00000000 --- a/modules/distribution/src/statistics/carbonapps/Pressure/Eventstream_pressure_1.0.0/artifact.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - org.wso2.iot.devices.pressure_1.0.0.json - - diff --git a/modules/distribution/src/statistics/carbonapps/Pressure/Eventstream_pressure_1.0.0/org.wso2.iot.devices.pressure_1.0.0.json b/modules/distribution/src/statistics/carbonapps/Pressure/Eventstream_pressure_1.0.0/org.wso2.iot.devices.pressure_1.0.0.json deleted file mode 100644 index f58059d2..00000000 --- a/modules/distribution/src/statistics/carbonapps/Pressure/Eventstream_pressure_1.0.0/org.wso2.iot.devices.pressure_1.0.0.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "org.wso2.iot.devices.pressure", - "version": "1.0.0", - "nickName": "Pressure Data", - "description": "Pressure data received from the Device", - "metaData": [ - {"name":"owner","type":"STRING"}, - {"name":"deviceType","type":"STRING"}, - {"name":"deviceId","type":"STRING"}, - {"name":"time","type":"LONG"} - ], - "payloadData": [ - { - "name": "pressure","type": "FLOAT" - } - ] -} - - - diff --git a/modules/distribution/src/statistics/carbonapps/Pressure/Sparkscripts_1.0.0/Pressure_Sensor_Script.xml b/modules/distribution/src/statistics/carbonapps/Pressure/Sparkscripts_1.0.0/Pressure_Sensor_Script.xml deleted file mode 100644 index d6c0e353..00000000 --- a/modules/distribution/src/statistics/carbonapps/Pressure/Sparkscripts_1.0.0/Pressure_Sensor_Script.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - IoTServer_Sensor_Script - - 0 * * * * ? - diff --git a/modules/distribution/src/statistics/carbonapps/Pressure/Sparkscripts_1.0.0/artifact.xml b/modules/distribution/src/statistics/carbonapps/Pressure/Sparkscripts_1.0.0/artifact.xml deleted file mode 100644 index 046bc619..00000000 --- a/modules/distribution/src/statistics/carbonapps/Pressure/Sparkscripts_1.0.0/artifact.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - Pressure_Sensor_Script.xml - diff --git a/modules/distribution/src/statistics/carbonapps/Pressure/artifacts.xml b/modules/distribution/src/statistics/carbonapps/Pressure/artifacts.xml deleted file mode 100644 index 249b33da..00000000 --- a/modules/distribution/src/statistics/carbonapps/Pressure/artifacts.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/modules/distribution/src/statistics/carbonapps/Proximity/Eventreceiver_proximity_1.0.0/EventReceiver_proximity.xml b/modules/distribution/src/statistics/carbonapps/Proximity/Eventreceiver_proximity_1.0.0/EventReceiver_proximity.xml deleted file mode 100644 index d57d2e0a..00000000 --- a/modules/distribution/src/statistics/carbonapps/Proximity/Eventreceiver_proximity_1.0.0/EventReceiver_proximity.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - false - - - - diff --git a/modules/distribution/src/statistics/carbonapps/Proximity/Eventreceiver_proximity_1.0.0/artifact.xml b/modules/distribution/src/statistics/carbonapps/Proximity/Eventreceiver_proximity_1.0.0/artifact.xml deleted file mode 100644 index 1e3fbccb..00000000 --- a/modules/distribution/src/statistics/carbonapps/Proximity/Eventreceiver_proximity_1.0.0/artifact.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - EventReceiver_proximity.xml - diff --git a/modules/distribution/src/statistics/carbonapps/Proximity/Eventstore_proximity_1.0.0/artifact.xml b/modules/distribution/src/statistics/carbonapps/Proximity/Eventstore_proximity_1.0.0/artifact.xml deleted file mode 100644 index bdcffa5b..00000000 --- a/modules/distribution/src/statistics/carbonapps/Proximity/Eventstore_proximity_1.0.0/artifact.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - org_wso2_iot_devices_proximity.xml - diff --git a/modules/distribution/src/statistics/carbonapps/Proximity/Eventstore_proximity_1.0.0/org_wso2_iot_devices_proximity.xml b/modules/distribution/src/statistics/carbonapps/Proximity/Eventstore_proximity_1.0.0/org_wso2_iot_devices_proximity.xml deleted file mode 100644 index f0958f01..00000000 --- a/modules/distribution/src/statistics/carbonapps/Proximity/Eventstore_proximity_1.0.0/org_wso2_iot_devices_proximity.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - org.wso2.iot.devices.proximity:1.0.0 - - EVENT_STORE - - - meta_owner - true - true - false - STRING - - - meta_deviceType - true - true - false - STRING - - - meta_deviceId - true - true - false - STRING - - - meta_time - true - true - false - LONG - - - proximity - false - false - false - FLOAT - - - \ No newline at end of file diff --git a/modules/distribution/src/statistics/carbonapps/Proximity/Eventstream_proximity_1.0.0/artifact.xml b/modules/distribution/src/statistics/carbonapps/Proximity/Eventstream_proximity_1.0.0/artifact.xml deleted file mode 100644 index bec60673..00000000 --- a/modules/distribution/src/statistics/carbonapps/Proximity/Eventstream_proximity_1.0.0/artifact.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - org.wso2.iot.devices.proximity_1.0.0.json - - diff --git a/modules/distribution/src/statistics/carbonapps/Proximity/Eventstream_proximity_1.0.0/org.wso2.iot.devices.proximity_1.0.0.json b/modules/distribution/src/statistics/carbonapps/Proximity/Eventstream_proximity_1.0.0/org.wso2.iot.devices.proximity_1.0.0.json deleted file mode 100644 index 88fb9008..00000000 --- a/modules/distribution/src/statistics/carbonapps/Proximity/Eventstream_proximity_1.0.0/org.wso2.iot.devices.proximity_1.0.0.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "org.wso2.iot.devices.proximity", - "version": "1.0.0", - "nickName": "Proximity Data", - "description": "Proximity data received from the Device", - "metaData": [ - {"name":"owner","type":"STRING"}, - {"name":"deviceType","type":"STRING"}, - {"name":"deviceId","type":"STRING"}, - {"name":"time","type":"LONG"} - ], - "payloadData": [ - { - "name": "proximity","type": "FLOAT" - } - ] -} - - - diff --git a/modules/distribution/src/statistics/carbonapps/Proximity/Sparkscripts_1.0.0/Proximity_Sensor_Script.xml b/modules/distribution/src/statistics/carbonapps/Proximity/Sparkscripts_1.0.0/Proximity_Sensor_Script.xml deleted file mode 100644 index 889cfca6..00000000 --- a/modules/distribution/src/statistics/carbonapps/Proximity/Sparkscripts_1.0.0/Proximity_Sensor_Script.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - IoTServer_Sensor_Script - - 0 * * * * ? - diff --git a/modules/distribution/src/statistics/carbonapps/Proximity/Sparkscripts_1.0.0/artifact.xml b/modules/distribution/src/statistics/carbonapps/Proximity/Sparkscripts_1.0.0/artifact.xml deleted file mode 100644 index c3bc1d61..00000000 --- a/modules/distribution/src/statistics/carbonapps/Proximity/Sparkscripts_1.0.0/artifact.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - Proximity_Sensor_Script.xml - diff --git a/modules/distribution/src/statistics/carbonapps/Proximity/artifacts.xml b/modules/distribution/src/statistics/carbonapps/Proximity/artifacts.xml deleted file mode 100644 index d682d5b6..00000000 --- a/modules/distribution/src/statistics/carbonapps/Proximity/artifacts.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/modules/distribution/src/statistics/carbonapps/Rotation/Eventreceiver_rotation_1.0.0/EventReceiver_rotation.xml b/modules/distribution/src/statistics/carbonapps/Rotation/Eventreceiver_rotation_1.0.0/EventReceiver_rotation.xml deleted file mode 100644 index df0dfb57..00000000 --- a/modules/distribution/src/statistics/carbonapps/Rotation/Eventreceiver_rotation_1.0.0/EventReceiver_rotation.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - false - - - - diff --git a/modules/distribution/src/statistics/carbonapps/Rotation/Eventreceiver_rotation_1.0.0/artifact.xml b/modules/distribution/src/statistics/carbonapps/Rotation/Eventreceiver_rotation_1.0.0/artifact.xml deleted file mode 100644 index 3395400e..00000000 --- a/modules/distribution/src/statistics/carbonapps/Rotation/Eventreceiver_rotation_1.0.0/artifact.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - EventReceiver_rotation.xml - diff --git a/modules/distribution/src/statistics/carbonapps/Rotation/Eventstore_rotation_1.0.0/artifact.xml b/modules/distribution/src/statistics/carbonapps/Rotation/Eventstore_rotation_1.0.0/artifact.xml deleted file mode 100644 index 6a75eba8..00000000 --- a/modules/distribution/src/statistics/carbonapps/Rotation/Eventstore_rotation_1.0.0/artifact.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - org_wso2_iot_devices_rotation.xml - diff --git a/modules/distribution/src/statistics/carbonapps/Rotation/Eventstore_rotation_1.0.0/org_wso2_iot_devices_rotation.xml b/modules/distribution/src/statistics/carbonapps/Rotation/Eventstore_rotation_1.0.0/org_wso2_iot_devices_rotation.xml deleted file mode 100644 index 8e6863f5..00000000 --- a/modules/distribution/src/statistics/carbonapps/Rotation/Eventstore_rotation_1.0.0/org_wso2_iot_devices_rotation.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - org.wso2.iot.devices.rotation:1.0.0 - - EVENT_STORE - - - meta_owner - true - true - false - STRING - - - meta_deviceType - true - true - false - STRING - - - meta_deviceId - true - true - false - STRING - - - meta_time - true - true - false - LONG - - - rotation - false - false - false - FLOAT - - - \ No newline at end of file diff --git a/modules/distribution/src/statistics/carbonapps/Rotation/Eventstream_rotation_1.0.0/artifact.xml b/modules/distribution/src/statistics/carbonapps/Rotation/Eventstream_rotation_1.0.0/artifact.xml deleted file mode 100644 index 21982655..00000000 --- a/modules/distribution/src/statistics/carbonapps/Rotation/Eventstream_rotation_1.0.0/artifact.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - org.wso2.iot.devices.rotation_1.0.0.json - - diff --git a/modules/distribution/src/statistics/carbonapps/Rotation/Eventstream_rotation_1.0.0/org.wso2.iot.devices.rotation_1.0.0.json b/modules/distribution/src/statistics/carbonapps/Rotation/Eventstream_rotation_1.0.0/org.wso2.iot.devices.rotation_1.0.0.json deleted file mode 100644 index 03881bcf..00000000 --- a/modules/distribution/src/statistics/carbonapps/Rotation/Eventstream_rotation_1.0.0/org.wso2.iot.devices.rotation_1.0.0.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "org.wso2.iot.devices.rotation", - "version": "1.0.0", - "nickName": "Rotation Data", - "description": "Rotation data received from the Device", - "metaData": [ - {"name":"owner","type":"STRING"}, - {"name":"deviceType","type":"STRING"}, - {"name":"deviceId","type":"STRING"}, - {"name":"time","type":"LONG"} - ], - "payloadData": [ - { - "name": "rotation","type": "FLOAT" - } - ] -} - - - diff --git a/modules/distribution/src/statistics/carbonapps/Rotation/Sparkscripts_1.0.0/Rotation_Sensor_Script.xml b/modules/distribution/src/statistics/carbonapps/Rotation/Sparkscripts_1.0.0/Rotation_Sensor_Script.xml deleted file mode 100644 index ed2730eb..00000000 --- a/modules/distribution/src/statistics/carbonapps/Rotation/Sparkscripts_1.0.0/Rotation_Sensor_Script.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - IoTServer_Sensor_Script - - 0 * * * * ? - diff --git a/modules/distribution/src/statistics/carbonapps/Rotation/Sparkscripts_1.0.0/artifact.xml b/modules/distribution/src/statistics/carbonapps/Rotation/Sparkscripts_1.0.0/artifact.xml deleted file mode 100644 index 59ec9383..00000000 --- a/modules/distribution/src/statistics/carbonapps/Rotation/Sparkscripts_1.0.0/artifact.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - Rotation_Sensor_Script.xml - diff --git a/modules/distribution/src/statistics/carbonapps/Rotation/artifacts.xml b/modules/distribution/src/statistics/carbonapps/Rotation/artifacts.xml deleted file mode 100644 index 4a2b6e95..00000000 --- a/modules/distribution/src/statistics/carbonapps/Rotation/artifacts.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/modules/distribution/src/statistics/carbonapps/Temperature_Sensor/Eventreceiver_temperature_1.0.0/EventReceiver_temperature.xml b/modules/distribution/src/statistics/carbonapps/Temperature_Sensor/Eventreceiver_temperature_1.0.0/EventReceiver_temperature.xml deleted file mode 100644 index 6786696c..00000000 --- a/modules/distribution/src/statistics/carbonapps/Temperature_Sensor/Eventreceiver_temperature_1.0.0/EventReceiver_temperature.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - false - - - - diff --git a/modules/distribution/src/statistics/carbonapps/Temperature_Sensor/Eventreceiver_temperature_1.0.0/artifact.xml b/modules/distribution/src/statistics/carbonapps/Temperature_Sensor/Eventreceiver_temperature_1.0.0/artifact.xml deleted file mode 100644 index b72e1ff7..00000000 --- a/modules/distribution/src/statistics/carbonapps/Temperature_Sensor/Eventreceiver_temperature_1.0.0/artifact.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - EventReceiver_temperature.xml - diff --git a/modules/distribution/src/statistics/carbonapps/Temperature_Sensor/Eventstore_temperature_1.0.0/artifact.xml b/modules/distribution/src/statistics/carbonapps/Temperature_Sensor/Eventstore_temperature_1.0.0/artifact.xml deleted file mode 100644 index 90b14c11..00000000 --- a/modules/distribution/src/statistics/carbonapps/Temperature_Sensor/Eventstore_temperature_1.0.0/artifact.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - org_wso2_iot_devices_temperature.xml - diff --git a/modules/distribution/src/statistics/carbonapps/Temperature_Sensor/Eventstore_temperature_1.0.0/org_wso2_iot_devices_temperature.xml b/modules/distribution/src/statistics/carbonapps/Temperature_Sensor/Eventstore_temperature_1.0.0/org_wso2_iot_devices_temperature.xml deleted file mode 100644 index 13a625bd..00000000 --- a/modules/distribution/src/statistics/carbonapps/Temperature_Sensor/Eventstore_temperature_1.0.0/org_wso2_iot_devices_temperature.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - org.wso2.iot.devices.temperature:1.0.0 - - EVENT_STORE - - - meta_owner - true - true - false - STRING - - - meta_deviceType - true - true - false - STRING - - - meta_deviceId - true - true - false - STRING - - - meta_time - true - true - false - LONG - - - temperature - false - false - false - FLOAT - - - \ No newline at end of file diff --git a/modules/distribution/src/statistics/carbonapps/Temperature_Sensor/Eventstream_temperature_1.0.0/artifact.xml b/modules/distribution/src/statistics/carbonapps/Temperature_Sensor/Eventstream_temperature_1.0.0/artifact.xml deleted file mode 100644 index 61e7903b..00000000 --- a/modules/distribution/src/statistics/carbonapps/Temperature_Sensor/Eventstream_temperature_1.0.0/artifact.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - org.wso2.iot.devices.temperature_1.0.0.json - - diff --git a/modules/distribution/src/statistics/carbonapps/Temperature_Sensor/Eventstream_temperature_1.0.0/org.wso2.iot.devices.temperature_1.0.0.json b/modules/distribution/src/statistics/carbonapps/Temperature_Sensor/Eventstream_temperature_1.0.0/org.wso2.iot.devices.temperature_1.0.0.json deleted file mode 100644 index 5d94b982..00000000 --- a/modules/distribution/src/statistics/carbonapps/Temperature_Sensor/Eventstream_temperature_1.0.0/org.wso2.iot.devices.temperature_1.0.0.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "org.wso2.iot.devices.temperature", - "version": "1.0.0", - "nickName": "Temperature Data", - "description": "Temperature data received from the Device", - "metaData": [ - {"name":"owner","type":"STRING"}, - {"name":"deviceType","type":"STRING"}, - {"name":"deviceId","type":"STRING"}, - {"name":"time","type":"LONG"} - ], - "payloadData": [ - { - "name": "temperature","type": "FLOAT" - } - ] -} - - - diff --git a/modules/distribution/src/statistics/carbonapps/Temperature_Sensor/Sparkscripts_1.0.0/Temperature_Sensor_Script.xml b/modules/distribution/src/statistics/carbonapps/Temperature_Sensor/Sparkscripts_1.0.0/Temperature_Sensor_Script.xml deleted file mode 100644 index ee6a7195..00000000 --- a/modules/distribution/src/statistics/carbonapps/Temperature_Sensor/Sparkscripts_1.0.0/Temperature_Sensor_Script.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - IoTServer_Sensor_Script - - 0 * * * * ? - diff --git a/modules/distribution/src/statistics/carbonapps/Temperature_Sensor/Sparkscripts_1.0.0/artifact.xml b/modules/distribution/src/statistics/carbonapps/Temperature_Sensor/Sparkscripts_1.0.0/artifact.xml deleted file mode 100644 index 58c2dcc1..00000000 --- a/modules/distribution/src/statistics/carbonapps/Temperature_Sensor/Sparkscripts_1.0.0/artifact.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - Temperature_Sensor_Script.xml - diff --git a/modules/distribution/src/statistics/carbonapps/Temperature_Sensor/artifacts.xml b/modules/distribution/src/statistics/carbonapps/Temperature_Sensor/artifacts.xml deleted file mode 100644 index b5350763..00000000 --- a/modules/distribution/src/statistics/carbonapps/Temperature_Sensor/artifacts.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/modules/distribution/src/statistics/carbonapps/build.xml b/modules/distribution/src/statistics/carbonapps/build.xml deleted file mode 100644 index b3d87e62..00000000 --- a/modules/distribution/src/statistics/carbonapps/build.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/modules/distribution/src/statistics/carbonapps/pom.xml b/modules/distribution/src/statistics/carbonapps/pom.xml deleted file mode 100644 index 56205789..00000000 --- a/modules/distribution/src/statistics/carbonapps/pom.xml +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - org.wso2.iot - wso2iot-parent - 1.0.0-SNAPSHOT - ../../../../../pom.xml - - - 4.0.0 - iot-sample-capps - WSO2 iot server sample capp - pom - - - - - maven-clean-plugin - 2.4.1 - - - auto-clean - initialize - - clean - - - - - - maven-antrun-plugin - 1.7 - - - process-resources - - - - - - - run - - - - - - - - \ No newline at end of file From 7e0d384dc9a0f6632c322efc76f69332765189b6 Mon Sep 17 00:00:00 2001 From: Ace Date: Sat, 12 Dec 2015 12:19:52 +0530 Subject: [PATCH 21/24] Copying api publisher/store feature to pack --- modules/distribution/src/assembly/bin.xml | 33 ++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/modules/distribution/src/assembly/bin.xml b/modules/distribution/src/assembly/bin.xml index 8bb9fb44..210658b6 100644 --- a/modules/distribution/src/assembly/bin.xml +++ b/modules/distribution/src/assembly/bin.xml @@ -416,7 +416,7 @@ 644 - + ../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/deployment/server/jaggeryapps/publisher/ @@ -446,6 +446,37 @@ + + + + ../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/deployment/server/jaggeryapps/api-publisher/ + + ${pom.artifactId}-${pom.version}/repository/deployment/server/jaggeryapps/api-publisher + + + publisherLogo/** + publisherTheme/** + publisherSite/** + footer/** + localstyles.css + + + + + ../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/deployment/server/jaggeryapps/api-store/ + + ${pom.artifactId}-${pom.version}/repository/deployment/server/jaggeryapps/api-store + + + storeLogo/** + storeSite/** + base-page/** + login/** + styles-layout.css + + + + src/repository/resources From e7c7ab0e5095f9b565a4e2d9329c921e425d19af Mon Sep 17 00:00:00 2001 From: Shabirmean Date: Sat, 12 Dec 2015 15:01:33 +0530 Subject: [PATCH 22/24] Adding execution to rename api store and publisher context in site.son --- modules/distribution/pom.xml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/modules/distribution/pom.xml b/modules/distribution/pom.xml index 580abf65..6f4e64a7 100644 --- a/modules/distribution/pom.xml +++ b/modules/distribution/pom.xml @@ -554,6 +554,40 @@ + + + replace-for-api-publisher + prepare-package + + replace + + + ${basedir}/../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/deployment/server/jaggeryapps/api-publisher/site/conf/site.json + + + (/publisher) + /api-publisher + + + + + + replace-for-api-store + prepare-package + + replace + + + ${basedir}/../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/deployment/server/jaggeryapps/api-store/site/conf/site.json + + + (/store) + /api-store + + + + + - - https://${carbon.local.ip}:${mgt.transport.https.port}${carbon.context}/services/ - + https://${carbon.local.ip}:${mgt.transport.https.port}${carbon.context}/services/ @@ -544,4 +542,4 @@ You can enable this and set preferable Logger name. --> - \ No newline at end of file + From c32caa6067b170680b0ccebae0fb941485db643d Mon Sep 17 00:00:00 2001 From: charithag Date: Mon, 14 Dec 2015 12:25:57 +0530 Subject: [PATCH 24/24] Copy cdmf related uuf contents from devicemgt-cdmf --- modules/distribution/src/assembly/bin.xml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/modules/distribution/src/assembly/bin.xml b/modules/distribution/src/assembly/bin.xml index 210658b6..d7201a85 100644 --- a/modules/distribution/src/assembly/bin.xml +++ b/modules/distribution/src/assembly/bin.xml @@ -394,6 +394,18 @@ + + + ../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/deployment/server/jaggeryapps/devicemgt-cdmf/ + + + ${pom.artifactId}-${pom.version}/repository/deployment/server/jaggeryapps/devicemgt + + + jaggery.conf + + + ../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/deployment/server/jaggeryapps/devicemgt/