Difference between revisions of "Knowledge:Migration from 6.4.1 to 6.4.2"

From OpenKM Documentation
Jump to: navigation, search
Line 7: Line 7:
 
* Make a backup!!!
 
* Make a backup!!!
  
== Task 1 ==
+
== Task 1 - Automation classes automatic loaded ==
 
* '''All OKM_NODETYPE* tables should be deleted'''
 
* '''All OKM_NODETYPE* tables should be deleted'''
 
* '''All OKM_TASK_MANAGER* tables should be deleted'''
 
* '''All OKM_TASK_MANAGER* tables should be deleted'''

Revision as of 09:56, 10 September 2013


Nota clasica.png OpenKM 6.4.2 is currently under development.

  • Make a backup!!!

Task 1 - Automation classes automatic loaded

  • All OKM_NODETYPE* tables should be deleted
  • All OKM_TASK_MANAGER* tables should be deleted

Task 2 - Update Automation now classes are loaded automatically

  • Migration of automation step 1
SELECT AAC_ID, AAC_TYPE, 'UPDATE OKM_AUTO_ACTION set AAC_CLASS_NAME=''' || (SELECT AMD_CLASS_NAME FROM OKM_AUTO_METADATA WHERE AMD_ID=AAC_TYPE) || ''' where AAC_ID=' || AAC_ID || ';'  FROM OKM_AUTO_ACTION;
SELECT AVL_ID, AVL_TYPE, 'UPDATE OKM_AUTO_VALIDATION set AVL_CLASS_NAME=''' || (SELECT AMD_CLASS_NAME FROM OKM_AUTO_METADATA WHERE AMD_ID=AVL_TYPE) || ''' where AVL_ID=' || AVL_ID || ';' FROM OKM_AUTO_VALIDATION;
  • Stop Tomcat
  • Run from your preferred SQL client these queries:
-- Configuration
UPDATE OKM_CONFIG SET CFG_KEY='text.banner' WHERE CFG_KEY='logo.banner';
UPDATE OKM_CONFIG SET CFG_KEY='text.welcome' WHERE CFG_KEY='logo.welcome';

-- Mail account seen
ALTER TABLE OKM_MAIL_ACCOUNT DROP COLUMN MA_MMARK_SEEN;
  • Edit OpenKM.cfg and set hibernate.hbm2ddl to update
  • Replace the OpenKM.war
  • Review file descriptor limit and, eventually, increase it.
  • Start Tomcat again
  • Migration of automation step 2

Go to database query and execute sql output from automation step 1. Finally execute the sql queries to drop non used columns.

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

-- Remove node scripting
ALTER TABLE OKM_NODE_BASE DROP COLUMN NDC_SCRIPTING;
ALTER TABLE OKM_NODE_BASE DROP COLUMN NDC_SCRIPT_CODE;

-- Node class
UPDATE OKM_NODE_BASE SET NBS_NODE_CLASS=0;

Task 3 - Update OCR Template, now classes are loaded automatically

drop table OKM_OCR_TEMPLATE_METADATA;
UPDATE OKM_OCR_TEMPLATE_FIELD SET OTF_CLASS_NAME='com.openkm.ocr.template.parser.StringParser' WHERE OTF_TYPE='1';
UPDATE OKM_OCR_TEMPLATE_FIELD SET OTF_CLASS_NAME='com.openkm.ocr.template.parser.NumberParser' WHERE OTF_TYPE='2'
UPDATE OKM_OCR_TEMPLATE_FIELD SET OTF_CLASS_NAME='com.openkm.ocr.template.parser.DateParser' WHERE OTF_TYPE='3'

HSQL

ALTER TABLE OKM_OCR_TEMPLATE_FIELD DROP COLUMN OTF_TYPE;

Task 4

  • Check for database errors:
$ grep "ERROR .*hbm2ddl" $TOMCAT_HOME/logs/catalina.log

Task 5 - Folder style default value

Go to administration->database query and execute ( set default folder style=0)

All databases

update OKM_NODE_FOLDER SET NFL_STYLE=0;

Task 6 - Task start/end hour default value

Go to administration->database query and execute ( set default has start hour and has default end hour = true)

All databases

UPDATE OKM_TASK_MANAGER_TASK SET TMT_HAS_END_HOUR='T',	TMT_HAS_START_HOUR='T';


  • Enjoy OpenKM 6.4.2!

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

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

And start Tomcat again.


Nota clasica.png Recommended to clear browser cache and Java Plugin cache