Knowledge:Migration from 6.4.1 to 6.4.2
From OpenKM Documentation
Revision as of 08:11, 15 October 2013 by Jllort (talk | contribs) (→Task 2 - Automation classes automatic loaded)
- Download update from http://openkm.com/download/okm/OpenKM-6.4.2.zip (eMpg8eIjY5)
- Make a backup!!!
Contents
- 1 Task 1 - Install jdk 1.7
- 2 Task 2 - Automation classes automatic loaded
- 3 Task 3 - Update Automation now classes are loaded automatically
- 4 Task 4 - Update OCR Template, now classes are loaded automatically
- 5 Task 5
- 6 Task 6 - Folder style default value
- 7 Task 7 - Task start/end hour default value
Task 1 - Install jdk 1.7
Is mandatory install jdk 1.7 otherside application will not be deployed.
Task 2 - Automation classes automatic loaded
- All OKM_NODETYPE* tables should be deleted
- All OKM_TASK_MANAGER* tables should be deleted
HSQL
DROP TABLE OKM_NODE_TYPE;
DROP TABLE OKM_TASK_MANAGER_TASK_USER;
DROP TABLE OKM_TASK_MANAGER_TASK_ROLE;
DROP TABLE OKM_TASK_MANAGER_TASK_RECORD;
DROP TABLE OKM_TASK_MANAGER_TASK_MAIL;
DROP TABLE OKM_TASK_MANAGER_TASK_FOLDER;
DROP TABLE OKM_TASK_MANAGER_TASK_DOCUMENT;
DROP TABLE OKM_TASK_MANAGER_TASK;
DROP TABLE OKM_TASK_MANAGER_PROJECT;
DROP TABLE OKM_TASK_MANAGER_STATUS;
MySQL
SET FOREIGN_KEY_CHECKS=0;
DROP TABLE OKM_NODE_TYPE;
SET FOREIGN_KEY_CHECKS=1;
DROP TABLE OKM_TASK_MANAGER_TASK_USER;
DROP TABLE OKM_TASK_MANAGER_TASK_ROLE;
DROP TABLE OKM_TASK_MANAGER_TASK_RECORD;
DROP TABLE OKM_TASK_MANAGER_TASK_MAIL;
DROP TABLE OKM_TASK_MANAGER_TASK_FOLDER;
DROP TABLE OKM_TASK_MANAGER_TASK_DOCUMENT;
DROP TABLE OKM_TASK_MANAGER_TASK;
DROP TABLE OKM_TASK_MANAGER_PROJECT;
DROP TABLE OKM_TASK_MANAGER_STATUS;
Task 3 - Update Automation now classes are loaded automatically
- Migration of automation step 1
HSQL
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;
MYSQL
SELECT AAC_ID, AAC_TYPE, CONCAT('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, CONCAT('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';
UPDATE OKM_CONFIG SET CFG_TYPE='string' WHERE CFG_KEY='max.file.size';
-- 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 4 - 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';
All databases
ALTER TABLE OKM_OCR_TEMPLATE_FIELD DROP COLUMN OTF_TYPE;
Task 5
- Check for database errors:
$ grep "ERROR .*hbm2ddl" $TOMCAT_HOME/logs/catalina.log
Task 6 - 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;
-- If have several tennats should be added for each tenant
-- IMPORTA IF YOU'RE IN HSQL SHOULD ( 2GB hsql limitation -> divide in several files ):
-- 1-> In database sql SHUTDOWN COMPACT ( connection i closed and file compacted )
-- 2-> Restart OpenKM
-- 3-> Execute the query, probably now goes right read http://sourceforge.net/mailarchive/forum.php?forum_name=hsqldb-user&max_rows=25&style=nested&viewmonth=200602
INSERT INTO OKM_FOLDER_STYLE (FS_ID, FS_TENANT, FS_NAME,FS_RD_CHILD_IMG_CONT, FS_RD_CHILD_IMG_MIME,FS_RD_CHILD_SUB_IMG_CONT, FS_RD_CHILD_SUB_IMG_MIME,FS_RD_EMPTY_IMG_CONT, FS_RD_EMPTY_IMG_MIME,FS_RD_EMPTY_SUB_IMG_MIME, FS_RD_EMPTY_SUB_IMG_CONT,FS_WR_CHILD_IMG_CONT, FS_WR_CHILD_IMG_MIME, FS_WR_CHILD_SUB_IMG_CONT, FS_WR_CHILD_SUB_IMG_MIME, FS_WR_EMPTY_IMG_CONT, FS_WR_EMPTY_IMG_MIME, FS_WR_EMPTY_SUB_IMG_MIME, FS_WR_EMPTY_SUB_IMG_CONT, FS_COMPLETE) VALUES ('1', '1', 'Default','R0lGODlhDwANAKUrAI8ZLJ8dL54gNbkVKKYkMJ8nNdAWH9UVHq4kOK0rOr4kNa0vPrQyO/8VG7wyOLwyP8Q2PcQ2RP81Jf9IP9hwdeB7ePd8ef5/ZviAgPiGheiRiPiOiPiTkPCZkPiYk/ihmPiomPinoPiooPi5sPjQyPjRyfjTy/nUzfnWz/nX0frW2P///////////////////////////////////////////////////////////////////////////////////yH5BAEKAD8ALAAAAAAPAA0AAAZywN8PQoQIj8gfYsVcIZLHCAjU0VQokWz26CB5v2DH8TEqm8+CIyPEDi3e8HiCQ198PiLS5cCfLAgbGwuBGx4lByoSDQMkARYLGJEYGSaIigolAAsWnJ0nlg0KJj8FpaYFFAaJoSdQR6AKKK5CEwO2EylBADs=','image/gif','R0lGODlhDwANAKU6ALkVKJ8nNdAWH9UVHklTY74kNa0vPqswP6oxQKU0Q0Zhcv8VGzpoeD9tfEJvfkVygUl1hEx4hlR3hlJ4h1B5iE96if81Jf9IP9hwdXicqIGjrvd8ebCaof5/ZviAgPiGhZKwupezu6yrsPiOiJq2v6Kzu/iYk6jAyPihmLK9w/iooL7L0LnN08HKzr/L0L3M0cDLz8rZ3vjQyPjRyfjTy/nUzfnWz/nX0frW2Pr7/P///////////////////////yH5BAEKAD8ALAAAAAAPAA0AAAZ6wN+PUqFMhMjkz5Fr5hxKZOV0IoE0mYq2IkFGYuCwOOJlmVkvV6sFWymQEOopdTDY7/cHiVRKoFAqMh0DhBcGDSEiBiOMJjM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AeP/GJP/GP+jQiPjQePjQgPDYkPjYiPjYkP/iZPjgmPjgoPjomPjosPrs1fjwyPr59//++f///////////////////////////////////////////////////////////////////////////////////////////////////////////////////yH+FUNyZWF0ZWQgd2l0aCBUaGUgR0lNUAAh+QQBCgA/ACwAAAAADwANAAAGacDfr0FsCI/IX2HEHBWSR0anc6FEIIxs9rgAeb/gxVHhKZvPgmOCw+Yg3vD4IUNHbO4ijWM/QRAwGAiAgCIOHxIPBiEBFQgWj4+Fh4khAAgVmJmSiIo/A5+gA5uUUEeGnCGlQhMGrRMhQQA7','image/gif','R0lGODlhDwANAKUiACRUZC9ebjRjcjhmdjlndz1rej5sez9tfEl1hEx4hlB7ilJ9i1aAjlmDkX6grIGjrpSxu5i0vpy3wKa/x6zDy67FzLLIz7fL0rnN07/R18HT2cTV2sjY3c3b4Nrl6O3y9Pf5+vr7/P///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////yH5BAEKAD8ALAAAAAAPAA0AAAZpwN+PQWQIj8gfIcQMEZLHBYdjmUAei2z2qPB4v2DFMdEpm8+BI2LD3hze8LgBQz9o7qBMYy85DC4XB4CAIA0eEQ4FHwEUBxWPj4WHiR8ABxSYmZKIij8Cn6ACm5RQR4acH6VCEgWtEh9BADs=','image/gif','R0lGODlhDwALAIQaAI9SGZ5fHZ5fIJ5mJ6VsJK1sJK1yK61yL7R/Mrx/MryFMsOFNsOLNtiwcODAeOjQiPjQePjQgPDYkPjYiPjYkPjgmPjgoPjomPjosPjwyP///////////////////////yH+FUNyZWF0ZWQgd2l0aCBUaGUgR0lNUAAh+QQBCgAfACwAAAAADwALAAAFTeD3MSQjnuhXaKxWpOdyXdLjNEuen0rm/0DFKYEpGo+CE8LCtBye0KiBQj1Urtjr40CYTA7ecHj7CUAOkbQ6Tf4ADpC4PN4WDe74PCoEADs=','image/gif','image/gif','R0lGODlhDwALAIQaACRUZC9ebjRjcjhmdjlndz5sez9tfEl1hEx4hlB7ilJ9i1aAjoGjrpSxu6a/x6zDy67FzLLIz7fL0rnN08HT2cTV2sjY3c3b4Nrl6Pr7/P///////////////////////yH5BAEKAB8ALAAAAAAPAAsAAAVN4Pct5CKe6EdkbEakp2JZkdMwSp6fCeb/wMQJcSkaj4HTocKsGJ7QaGFCNVCu2KvDMJBIDN5wePsJPAyQtDpN/gAMj7g83hYJ7vg8KgQAOw==','T');
Task 7 - 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';
- Set installation customer at License Manager.
- 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.
Recommended to clear browser cache and Java Plugin cache |