Migrating from 6.3.6 to 6.3.7

Preliminaries

  • Make a backup!!!

Migration

  • Stop Tomcat
  • Edit OpenKM.cfg and set hibernate.hbm2ddl to update
  • Replace the OpenKM.war
  • And start Tomcat again

Update automation definition

Execute the scripts below only if you have automation definitions

From version 6.3.7 automation are based on plugins architecture, that means must migrate older database structure to newer. Until the data will be migrated the automation section from the administration will raise errors.

MySQL

Execute the UPDATE queries result of the execution of the next queries:

SELECT CONCAT('UPDATE OKM_AUTO_ACTION SET AAC_CLASS_NAME=''', m.AMD_CLASS_NAME , ''' WHERE  AAC_ID=', a.AAC_ID , ';') FROM OKM_AUTO_ACTION a, OKM_AUTO_METADATA m where m.AMD_ID=a.AAC_TYPE;
SELECT CONCAT('UPDATE OKM_AUTO_VALIDATION SET AVL_CLASS_NAME=''', m.AMD_CLASS_NAME , ''' WHERE  AVL_ID=', v.AVL_ID , ';') FROM OKM_AUTO_VALIDATION v, OKM_AUTO_METADATA m where m.AMD_ID=v.AVL_TYPE;

PostgreSQL

Execute the UPDATE queries result of the execution of the next queries:

SELECT 'UPDATE OKM_AUTO_ACTION SET AAC_CLASS_NAME=''' || m.AMD_CLASS_NAME || ''' WHERE  AAC_ID=' || a.AAC_ID || ';' FROM OKM_AUTO_ACTION a, OKM_AUTO_METADATA m where m.AMD_ID=a.AAC_TYPE;
SELECT 'UPDATE OKM_AUTO_VALIDATION SET AVL_CLASS_NAME=''' || m.AMD_CLASS_NAME || ''' WHERE  AVL_ID=' || v.AVL_ID || ';' FROM OKM_AUTO_VALIDATION v, OKM_AUTO_METADATA m where m.AMD_ID=v.AVL_TYPE;

HQL

Execute the UPDATE queries result of the execution of the next queries:

SELECT CONCAT('UPDATE OKM_AUTO_ACTION SET AAC_CLASS_NAME=''', m.AMD_CLASS_NAME , ''' WHERE  AAC_ID=', a.AAC_ID , ';') FROM OKM_AUTO_ACTION a, OKM_AUTO_METADATA m where m.AMD_ID=a.AAC_TYPE;
SELECT CONCAT('UPDATE OKM_AUTO_VALIDATION SET AVL_CLASS_NAME=''', m.AMD_CLASS_NAME , ''' WHERE  AVL_ID=', v.AVL_ID , ';') FROM OKM_AUTO_VALIDATION v, OKM_AUTO_METADATA m where m.AMD_ID=v.AVL_TYPE; 

Custom automation actions or validations

In case you have build your own custom automation actions or validations you should migrate your classes to the new plugin architecture. Consider reading the documentation sections below for better understanding of the migration process to the new architecture.

Deprecated  Automation documentation:

Current Automation documention:

All databases

Execute in all the cases.

UPDATE OKM_CONFIG SET CFG_TYPE='html' WHERE CFG_KEY='notification.message.body';
UPDATE OKM_CONFIG SET CFG_TYPE='html' WHERE CFG_KEY='proposed.subscription.message.body';
UPDATE OKM_CONFIG SET CFG_TYPE='html' WHERE CFG_KEY='subscription.message.body';

Before executing the scripts below, ensure automation data has been migrated correctly, then you can remove it.

DROP TABLE OKM_AUTO_METADATA;
ALTER TABLE OKM_AUTO_ACTION DROP COLUMN AAC_TYPE;
ALTER TABLE OKM_AUTO_VALIDATION DROP COLUMN AVL_TYPE;

If you have any weird problem try to stop Tomcat, delete these folders:

  • $TOMCAT_HOME/webapps/OpenKM
  • $TOMCAT_HOME/work/Catalina/localhost

Recommended to clear browser cache and Java Plugin cache.