diff --git a/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/sql/h2.sql b/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/sql/h2.sql index 638b489ed955..814c5df5e2fd 100644 --- a/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/sql/h2.sql +++ b/features/apimgt/org.wso2.carbon.apimgt.core.feature/src/main/resources/sql/h2.sql @@ -1592,7 +1592,7 @@ CREATE TABLE IF NOT EXISTS AM_API_SEQUENCE_BACKEND ( SEQUENCE LONGBLOB NOT NULL, NAME VARCHAR(256) NOT NULL, TYPE VARCHAR(120) NOT NULL, - PRIMARY KEY(ID), + PRIMARY KEY(ID, API_UUID, REVISION_UUID, TYPE), FOREIGN KEY(API_UUID) REFERENCES AM_API(API_UUID) ON DELETE CASCADE ); diff --git a/features/apimgt/org.wso2.carbon.apimgt.keymanager.feature/src/main/resources/sql/h2.sql b/features/apimgt/org.wso2.carbon.apimgt.keymanager.feature/src/main/resources/sql/h2.sql index ad6989643e3a..55b8d587f7bf 100644 --- a/features/apimgt/org.wso2.carbon.apimgt.keymanager.feature/src/main/resources/sql/h2.sql +++ b/features/apimgt/org.wso2.carbon.apimgt.keymanager.feature/src/main/resources/sql/h2.sql @@ -1311,6 +1311,17 @@ CREATE TABLE IF NOT EXISTS AM_API ( UNIQUE (API_PROVIDER,API_NAME,API_VERSION) ); +CREATE TABLE IF NOT EXISTS AM_API_SEQUENCE_BACKEND ( + ID VARCHAR(60) NOT NULL, + API_UUID VARCHAR(256) NOT NULL, + REVISION_UUID VARCHAR(256) DEFAULT '0', + SEQUENCE LONGBLOB NOT NULL, + NAME VARCHAR(256) NOT NULL, + TYPE VARCHAR(120) NOT NULL, + PRIMARY KEY(ID, API_UUID, REVISION_UUID, TYPE), + FOREIGN KEY(API_UUID) REFERENCES AM_API(API_UUID) ON DELETE CASCADE +); + CREATE TABLE IF NOT EXISTS AM_API_URL_MAPPING ( URL_MAPPING_ID INTEGER AUTO_INCREMENT, API_ID INTEGER NOT NULL,