diff --git a/modules/distribution/resources/migration-1.8.0_to_1.9.0/README.txt b/modules/distribution/resources/migration-1.8.0_to_1.9.0/README.txt new file mode 100644 index 0000000000..e680d1c65e --- /dev/null +++ b/modules/distribution/resources/migration-1.8.0_to_1.9.0/README.txt @@ -0,0 +1,51 @@ +Data Migration 1.7.0 to 1.8.0 +============================= + +1. Shutdown AM 1.7.0 if it is running. + +2. Backup your API Manager Databases of your AM 1.7.0 instance. + +3. Execute relevant sql script in in here against your API Manager Database. + +4. Now point same WSO2 Carbon Database(User Store and Registry) and API Manager Databases of your AM 1.7.0 instance to AM 1.8.0. +(Configure AM_1.8.0/repository/datasource/master-datasources.xml to point same databases configured in AM 1.7.0) + +5. Move your synapse configurations to APIM_1.8.0. For that, copy and replace APIM_1.7.0/repository/deployment/server/synapse-configs/default directory to APIM_1.8.0/repository/deployment/server/synapse-configs/default. Do not replace _TokenAPI_.xml, _RevokeAPI_.xml and _AuthorizeAPI_.xml files in the default/api subdirectory + +6. Start AM 1.8.0 and Login. + +7. Copy the /dbscripts/migration-1.7.0_to_1.8.0/swagger-doc-migration directory to (The new directory path will now be /swagger-doc-migration). + +8. Configure swagger-doc-migration/build.xml with the information for the below properties. + + registry.home= Path to AM pack location + username= Username for the AM server + password= Password for the AM server + host= IP of running AM server [In a distributed setup, give the host of the Publisher node] + port= Port of running AM server [In a distributed setup, give the port of the Publisher node] + version= Version of AM server + +9. Go inside swagger-doc-migration/ and execute "ant run". You should get a "BUILD SUCCESSFUL" message if it ran correctly. + +10. To re-index log in to carbon console (ex: http://localhost:9443/carbon) and delete 'lastaccesstime' resource in '/_system/local/repository/components/org.wso2.carbon.registry/indexing' location. For that go to Home-> Resources->Browse and navigate to the above given location. You can delete the 'lastaccesstime' resource by selecting Actions-> Delete + +11. shutdown AM 1.8.0 and delete /repository/conf/solr directory and restart the server. + + +Tenant Migration (Only needs to be done if you are migrating a multi-tenanted setup) +==================================================================================== + +1. Move your tenant synapse configurations to APIM_1.8.0. For that, copy and replace specific folders for tenants(shown as 1,2,...) from APIM_1.7.0/repository/tenants/ to APIM_1.8.0/repository/tenants. Do not replace _TokenAPI_.xml, _RevokeAPI_.xml and _AuthorizeAPI_.xml files in the default/api subdirectory. + +2. Start AM 1.8.0. + +3. Configure swagger-doc-migration/build.xml with the information for the below properties. (swagger-doc-migration folder should be already copied to ) + + registry.home= Path to AM pack location + username= Username for the AM server - respective tenant space + password= Password for the AM server - respective tenant space + host= IP of running AM server [In a distributed setup, give the host of the Publisher node] + port= Port of running AM server [In a distributed setup, give the port of the Publisher node] + version= Version of AM server + +4. Go inside swagger-doc-migration/ and execute "ant run". You should get a "BUILD SUCCESSFUL" message if it ran correctly. diff --git a/modules/distribution/resources/migration-1.8.0_to_1.9.0/h2.sql b/modules/distribution/resources/migration-1.8.0_to_1.9.0/h2.sql new file mode 100644 index 0000000000..5b59b9119c --- /dev/null +++ b/modules/distribution/resources/migration-1.8.0_to_1.9.0/h2.sql @@ -0,0 +1 @@ +ALTER TABLE AM_SUBSCRIPTION ADD SUBS_CREATE_STATE VARCHAR(50) DEFAULT 'SUBSCRIBE'; \ No newline at end of file diff --git a/modules/distribution/resources/migration-1.8.0_to_1.9.0/mssql.sql b/modules/distribution/resources/migration-1.8.0_to_1.9.0/mssql.sql new file mode 100644 index 0000000000..5b59b9119c --- /dev/null +++ b/modules/distribution/resources/migration-1.8.0_to_1.9.0/mssql.sql @@ -0,0 +1 @@ +ALTER TABLE AM_SUBSCRIPTION ADD SUBS_CREATE_STATE VARCHAR(50) DEFAULT 'SUBSCRIBE'; \ No newline at end of file diff --git a/modules/distribution/resources/migration-1.8.0_to_1.9.0/mysql.sql b/modules/distribution/resources/migration-1.8.0_to_1.9.0/mysql.sql new file mode 100644 index 0000000000..45e75b01b0 --- /dev/null +++ b/modules/distribution/resources/migration-1.8.0_to_1.9.0/mysql.sql @@ -0,0 +1 @@ +ALTER TABLE AM_SUBSCRIPTION ADD COLUMN SUBS_CREATE_STATE VARCHAR(50) DEFAULT 'SUBSCRIBE'; \ No newline at end of file diff --git a/modules/distribution/resources/migration-1.8.0_to_1.9.0/oracle.sql b/modules/distribution/resources/migration-1.8.0_to_1.9.0/oracle.sql new file mode 100644 index 0000000000..638438bf42 --- /dev/null +++ b/modules/distribution/resources/migration-1.8.0_to_1.9.0/oracle.sql @@ -0,0 +1 @@ +ALTER TABLE AM_APPLICATION GROUP_ID VARCHAR(100); diff --git a/modules/distribution/resources/migration-1.8.0_to_1.9.0/postgresql.sql b/modules/distribution/resources/migration-1.8.0_to_1.9.0/postgresql.sql new file mode 100644 index 0000000000..45e75b01b0 --- /dev/null +++ b/modules/distribution/resources/migration-1.8.0_to_1.9.0/postgresql.sql @@ -0,0 +1 @@ +ALTER TABLE AM_SUBSCRIPTION ADD COLUMN SUBS_CREATE_STATE VARCHAR(50) DEFAULT 'SUBSCRIBE'; \ No newline at end of file