Update the repository
When you have migrated your configuration to the new IDM installation, you need to handle the data that is stored in your repository. There are two options to update a repository:
-
Create a new IDM 7.2 repository, then migrate your data to the new repository.
When you have upgraded the repository, or created a new repository, start the IDM server and test that all your scripts are working as expected, before migrating your data.
Upgrade an existing repository
Upgrading an existing repository means that you do not need to migrate data. However, you must run a series of scripts that modify the repository, to use the new features in IDM 7.2.
Upgrading an existing repository is not supported if you use a DS repository. If you’re upgrading from a previous IDM release with a DS repository, you must create a new repository, then migrate your data to the new repository. |
Prepare an existing repository for IDM 7.2 as follows:
-
Shut down IDM, if it is running.
-
Clear all
configobjects
related tables. For example, in MySQL run:DELETE FROM openidm.configobjects; DELETE FROM openidm.configobjectproperties;
-
From your IDM 7.2 installation, run the schema update scripts for your database type:
-
Optionally,
/path/to/openidm/db/database-type/scripts/updates/01-explicit-managed_user-update.sql
. This script adds support for the new feature Activate and deactivate accounts.This script is only required for explicit managed_user
tables. -
For PostgreSQL only,
/path/to/openidm/db/postgresql/scripts/updates/00-json-to-jsonb.sql
. This script converts the data type from JSON to JSONB.-
Before you run
00-json-to-jsonb.sql
, modify the script to add any custom sql or additional indexes that referencejson
instead ofjsonb
. -
After you have saved the modified the script, run it.
-
-
-
Launch IDM and run the following Groovy script to clear the
reconprogressstate
data in your repository:def result = openidm.query( "repo/reconprogressstate", [ "_queryFilter" : "true", "_fields" : "_id" ]).result; for ( item in result ) { openidm.delete("repo/reconprogressstate/" + item["_id"], null); } return result.size() + " reconprogressstate records deleted";
This script will work regardless of the type of repository, and can be sent as a REST call. For example:
curl \ --header "X-OpenIDM-Username: openidm-admin" \ --header "X-OpenIDM-Password: openidm-admin" \ --header "Content-Type: application/json" \ --request POST \ --data '{ "type":"groovy", "source":"def result = openidm.query(\"repo/reconprogressstate\", [ \"_queryFilter\" : \"true\", \"_fields\" : \"_id\" ]).result; for ( item in result ) { openidm.delete(\"repo/reconprogressstate/\" + item[\"_id\"], null); }; return result.size() + \" reconprogressstate records deleted\";" }' \ "http://localhost:8080/openidm/script?_action=eval" "1 reconprogressstate records deleted"
-
Verify that all scripts and functions behave as expected.
Create a new repository
Set up a new repository, following the steps in Select a repository. A new repository is already configured for all the new capabilities in IDM, but does require migrating existing data to that repository.
If you create a new repository, you must still update your configuration files to use the new features.
After you have set up the new repository, migrate your data to that repository.