Appendix > Installing the Remote API > To migrate a database schema
To migrate a database schema
The new version of the Windchill Requirements Connector uses a changed database schema (Schema version 5.2). To be able to access a database schema created with an older version (Schema version 4.0,5.0 and 5.1), this schema must be migrated to the new one. A migrated schema cannot be used with the old version of the Requirements Synchronizer. To check and migrate the database schema you must add the following code:
IRemoteProject project = ...;

// Only local replication databases can be migrated
// Only the database schema 4.0,5.0 and 5.1 can be migrated to 5.2
// Convert database schema version 5.1 to 5.2
if("5.1".equals(remoteClient.getDatabaseSchemaVersion(project)) {
operationResult = remoteClient.migrateLocalDatabaseSchema(project);
if(!result.getSuccessful()) {
// the migration failed
}
}
* 
You only can migrate the database schema version from 4.0,5.0 and 5.1 to 5.2. Any other database schema version will throw an exception.
Was this helpful?