From 1860f5c0fd2820b42df0f8337e1bf671b8109047 Mon Sep 17 00:00:00 2001 From: rusirijayodaillesinghe Date: Wed, 29 May 2024 22:01:31 +0530 Subject: [PATCH] Add new column to AM_API_CLIENT_CERTIFICATE in DB Scripts --- .../src/main/resources/multi-dc/OGG/oracle/apimgt/tables.sql | 1 + .../src/main/resources/multi-dc/OGG/oracle/apimgt/tables_23c.sql | 1 + .../main/resources/multi-dc/SQLServer/mssql/apimgt/tables.sql | 1 + .../src/main/resources/sql/db2.sql | 1 + .../src/main/resources/sql/mssql.sql | 1 + .../src/main/resources/sql/oracle.sql | 1 + .../src/main/resources/sql/oracle_23c.sql | 1 + .../src/main/resources/sql/oracle_rac.sql | 1 + .../src/main/resources/sql/postgresql.sql | 1 + 9 files changed, 9 insertions(+) diff --git a/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/multi-dc/OGG/oracle/apimgt/tables.sql b/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/multi-dc/OGG/oracle/apimgt/tables.sql index 5f596fd05e30..d4ecf1e2cdd9 100644 --- a/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/multi-dc/OGG/oracle/apimgt/tables.sql +++ b/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/multi-dc/OGG/oracle/apimgt/tables.sql @@ -1890,6 +1890,7 @@ CREATE TABLE AM_API_CLIENT_CERTIFICATE ( CERTIFICATE BLOB NOT NULL, REMOVED INTEGER DEFAULT 0 NOT NULL, TIER_NAME VARCHAR2 (512), + KEY_TYPE VARCHAR2(20) DEFAULT 'PRODUCTION' NOT NULL, REVISION_UUID VARCHAR2(255) DEFAULT 'Current API' NOT NULL, FOREIGN KEY (API_ID) REFERENCES AM_API (API_ID) ON DELETE CASCADE, PRIMARY KEY (ALIAS, TENANT_ID, REMOVED, REVISION_UUID) diff --git a/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/multi-dc/OGG/oracle/apimgt/tables_23c.sql b/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/multi-dc/OGG/oracle/apimgt/tables_23c.sql index 7fc03a02f84a..e9904030fcfb 100644 --- a/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/multi-dc/OGG/oracle/apimgt/tables_23c.sql +++ b/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/multi-dc/OGG/oracle/apimgt/tables_23c.sql @@ -1890,6 +1890,7 @@ CREATE TABLE AM_API_CLIENT_CERTIFICATE ( CERTIFICATE BLOB NOT NULL, REMOVED INTEGER DEFAULT 0 NOT NULL, TIER_NAME VARCHAR2 (512), + KEY_TYPE VARCHAR2(20) DEFAULT 'PRODUCTION' NOT NULL, REVISION_UUID VARCHAR2(255) DEFAULT 'Current API' NOT NULL, FOREIGN KEY (API_ID) REFERENCES AM_API (API_ID) ON DELETE CASCADE, PRIMARY KEY (ALIAS, TENANT_ID, REMOVED, REVISION_UUID) diff --git a/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/multi-dc/SQLServer/mssql/apimgt/tables.sql b/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/multi-dc/SQLServer/mssql/apimgt/tables.sql index db674b207a8f..62f3f9a3db41 100644 --- a/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/multi-dc/SQLServer/mssql/apimgt/tables.sql +++ b/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/multi-dc/SQLServer/mssql/apimgt/tables.sql @@ -2226,6 +2226,7 @@ CREATE TABLE AM_API_CLIENT_CERTIFICATE ( CERTIFICATE VARBINARY(MAX) NOT NULL, REMOVED BIT NOT NULL DEFAULT 0, TIER_NAME VARCHAR(512), + KEY_TYPE VARCHAR(20) NOT NULL DEFAULT 'PRODUCTION', REVISION_UUID VARCHAR(255) NOT NULL DEFAULT 'Current API', PRIMARY KEY (ALIAS, TENANT_ID, REMOVED, REVISION_UUID), FOREIGN KEY (API_ID) REFERENCES AM_API(API_ID) ON DELETE CASCADE diff --git a/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/sql/db2.sql b/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/sql/db2.sql index f2d25cc9370d..e9eafa9c76c1 100644 --- a/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/sql/db2.sql +++ b/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/sql/db2.sql @@ -2769,6 +2769,7 @@ CREATE TABLE AM_API_CLIENT_CERTIFICATE ( CERTIFICATE BLOB NOT NULL, REMOVED SMALLINT NOT NULL DEFAULT 0, TIER_NAME VARCHAR (512), + KEY_TYPE VARCHAR(20) NOT NULL DEFAULT 'PRODUCTION', REVISION_UUID VARCHAR(255) NOT NULL DEFAULT 'Current API', FOREIGN KEY (API_ID) REFERENCES AM_API (API_ID) ON DELETE CASCADE, PRIMARY KEY (ALIAS, TENANT_ID, REMOVED, REVISION_UUID) diff --git a/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/sql/mssql.sql b/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/sql/mssql.sql index 7ccf9e4bb3d2..aec49edb4cae 100644 --- a/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/sql/mssql.sql +++ b/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/sql/mssql.sql @@ -2237,6 +2237,7 @@ CREATE TABLE AM_API_CLIENT_CERTIFICATE ( CERTIFICATE VARBINARY(MAX) NOT NULL, REMOVED BIT NOT NULL DEFAULT 0, TIER_NAME VARCHAR(512), + KEY_TYPE VARCHAR(20) NOT NULL DEFAULT 'PRODUCTION', REVISION_UUID VARCHAR(255) NOT NULL DEFAULT 'Current API', PRIMARY KEY (ALIAS, TENANT_ID, REMOVED, REVISION_UUID), FOREIGN KEY (API_ID) REFERENCES AM_API(API_ID) ON DELETE CASCADE diff --git a/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/sql/oracle.sql b/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/sql/oracle.sql index d4e87d8f85ce..56341ff12206 100644 --- a/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/sql/oracle.sql +++ b/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/sql/oracle.sql @@ -3221,6 +3221,7 @@ CREATE TABLE AM_API_CLIENT_CERTIFICATE ( CERTIFICATE BLOB NOT NULL, REMOVED INTEGER DEFAULT 0 NOT NULL, TIER_NAME VARCHAR2 (512), + KEY_TYPE VARCHAR2(20) DEFAULT 'PRODUCTION' NOT NULL, REVISION_UUID VARCHAR2(255) DEFAULT 'Current API' NOT NULL, FOREIGN KEY (API_ID) REFERENCES AM_API (API_ID) ON DELETE CASCADE, PRIMARY KEY (ALIAS, TENANT_ID, REMOVED, REVISION_UUID) diff --git a/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/sql/oracle_23c.sql b/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/sql/oracle_23c.sql index a04316907f90..a8ff64669dd2 100644 --- a/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/sql/oracle_23c.sql +++ b/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/sql/oracle_23c.sql @@ -3221,6 +3221,7 @@ CREATE TABLE AM_API_CLIENT_CERTIFICATE ( CERTIFICATE BLOB NOT NULL, REMOVED INTEGER DEFAULT 0 NOT NULL, TIER_NAME VARCHAR2 (512), + KEY_TYPE VARCHAR2(20) DEFAULT 'PRODUCTION' NOT NULL, REVISION_UUID VARCHAR2(255) DEFAULT 'Current API' NOT NULL, FOREIGN KEY (API_ID) REFERENCES AM_API (API_ID) ON DELETE CASCADE, PRIMARY KEY (ALIAS, TENANT_ID, REMOVED, REVISION_UUID) diff --git a/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/sql/oracle_rac.sql b/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/sql/oracle_rac.sql index d91dc23057d2..e42e1dccc9d4 100644 --- a/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/sql/oracle_rac.sql +++ b/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/sql/oracle_rac.sql @@ -3195,6 +3195,7 @@ CREATE TABLE AM_API_CLIENT_CERTIFICATE ( CERTIFICATE BLOB NOT NULL, REMOVED INTEGER DEFAULT 0 NOT NULL, TIER_NAME VARCHAR2(512), + KEY_TYPE VARCHAR2(20) DEFAULT 'PRODUCTION' NOT NULL, REVISION_UUID VARCHAR2(255) DEFAULT 'Current API' NOT NULL, FOREIGN KEY (API_ID) REFERENCES AM_API (API_ID) ON DELETE CASCADE, PRIMARY KEY (ALIAS, TENANT_ID, REMOVED, REVISION_UUID) diff --git a/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/sql/postgresql.sql b/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/sql/postgresql.sql index f3a6e5ab6804..4b68cf809a39 100644 --- a/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/sql/postgresql.sql +++ b/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/sql/postgresql.sql @@ -2327,6 +2327,7 @@ CREATE TABLE AM_API_CLIENT_CERTIFICATE ( CERTIFICATE BYTEA NOT NULL, REMOVED BOOLEAN NOT NULL DEFAULT '0', TIER_NAME VARCHAR(512), + KEY_TYPE VARCHAR(20) NOT NULL DEFAULT 'PRODUCTION', REVISION_UUID VARCHAR(255) NOT NULL DEFAULT 'Current API', FOREIGN KEY (API_ID) REFERENCES AM_API (API_ID) ON DELETE CASCADE, PRIMARY KEY (ALIAS, TENANT_ID, REMOVED, REVISION_UUID)