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

From OpenKM Documentation
Jump to: navigation, search
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Note|OpenKM 6.4.1 is currently under development.}}
 
 
 
* See [http://issues.openkm.com/changelog_page.php?version_id=71 changelog at Mantis]
 
* See [http://issues.openkm.com/changelog_page.php?version_id=71 changelog at Mantis]
  
Line 10: Line 8:
 
<source lang="sql">
 
<source lang="sql">
 
-- ocr template
 
-- ocr template
DROP TABLE OKM_OCR_TEMPLATE;
 
 
DROP TABLE OKM_OCR_TEMPLATE_FIELD;
 
DROP TABLE OKM_OCR_TEMPLATE_FIELD;
 
DROP TABLE OKM_OCR_TEMPLATE_METADATA;
 
DROP TABLE OKM_OCR_TEMPLATE_METADATA;
 +
DROP TABLE OKM_OCR_TEMPLATE;
  
 
-- drop metadata tables
 
-- drop metadata tables
Line 27: Line 25:
  
 
-- in case you got several tennat is necessary add property group definition
 
-- in case you got several tennat is necessary add property group definition
 +
-- Possible null error -> needed to refresh cache !!!
 
insert into OKM_PROPERTY_GROUP_DEF (PGD_DEFINITION,PGD_TENANT)  values ('',2);
 
insert into OKM_PROPERTY_GROUP_DEF (PGD_DEFINITION,PGD_TENANT)  values ('',2);
 
</source>
 
</source>

Latest revision as of 11:17, 3 July 2013

  • Make a backup!!!

Take in consideration delete metadata and automation tables when it be possible do it.

-- ocr template
DROP TABLE OKM_OCR_TEMPLATE_FIELD;
DROP TABLE OKM_OCR_TEMPLATE_METADATA;
DROP TABLE OKM_OCR_TEMPLATE;

-- drop metadata tables
drop table OKM_REG_PROPERTY;
drop table OKM_REG_PROPERTY_GROUP;
drop table OKM_PROPERTY_GROUP_DEF;

-- drop automation tables
drop table OKM_AUTO_ACTION_PARAMS;
drop table OKM_AUTO_ACTION;
drop table OKM_AUTO_VALIDATION_PARAMS;
drop table OKM_AUTO_VALIDATION;
drop table OKM_AUTO_RULE;

-- in case you got several tennat is necessary add property group definition
-- Possible null error -> needed to refresh cache !!!
insert into OKM_PROPERTY_GROUP_DEF (PGD_DEFINITION,PGD_TENANT)  values ('',2);
  • Stop Tomcat
  • Run from your preferred SQL client these queries:

MySQL

-- Describe table
describe OKM_NODE_DOCUMENT_VERSION;

-- Expand column
alter table OKM_NODE_DOCUMENT_VERSION modify NDV_CHECKSUM varchar(128);

-- Set default tenant
update OKM_REG_PROPERTY_GROUP set RPG_TENANT=1;

-- Add default property group definition tenat
insert into OKM_PROPERTY_GROUP_DEF (PGD_ID, PGD_TENANT, PGD_DEFINITION) values (1, 1, '');

If there is no automation defined:

-- Show table constraints
DROP TABLE OKM_AUTO_ACTION_PARAMS;

If there is automation rules defined:

-- Show table constraints
SHOW CREATE TABLE OKM_AUTO_ACTION_PARAMS;

-- Remove primary key
ALTER TABLE OKM_AUTO_ACTION_PARAMS DROP PRIMARY KEY;
ALTER TABLE OKM_AUTO_ACTION_PARAMS DROP INDEX FK1F747E2D5E55CCFF; -- Use from create table
ALTER TABLE OKM_AUTO_ACTION_PARAMS DROP FOREIGN KEY FK1F747E2D5E55CCFF; -- Use from create table

-- Rename table field
ALTER TABLE OKM_AUTO_ACTION_PARAMS CHANGE AAP_VALIDATION AAP_ACTION bigint(20);

-- Create primary key
ALTER TABLE OKM_AUTO_ACTION_PARAMS ADD PRIMARY KEY (AAP_ACTION, AAP_ORDER);

PostgreSQL

-- Describe table
select column_name, udt_name, character_maximum_length from INFORMATION_SCHEMA.COLUMNS where table_name = 'okm_node_document_version';

-- Expand column
alter table OKM_NODE_DOCUMENT_VERSION alter column NDV_CHECKSUM type varchar(128);

-- Set default tenant
update OKM_REG_PROPERTY_GROUP set RPG_TENANT=1;

-- Add default property group definition tenat
insert into OKM_PROPERTY_GROUP_DEF (PGD_ID, PGD_TENANT, PGD_DEFINITION) values (1, 1, '');

If there is no automation defined:

-- Show table constraints
DROP TABLE OKM_AUTO_ACTION_PARAMS;

If there is automation rules defined:

-- NOT COMPLETED --

-- Rename table field
ALTER TABLE OKM_AUTO_ACTION_PARAMS RENAME COLUMN AAP_VALIDATION TO AAP_ACTION;

Oracle

-- Describe table
select * from user_tab_columns where table_name = 'OKM_NODE_DOCUMENT_VERSION' order by column_id;

-- Expand column
alter table OKM_NODE_DOCUMENT_VERSION modify (NDV_CHECKSUM varchar2(128));
  • Edit OpenKM.cfg and set hibernate.hbm2ddl to update
  • Replace the OpenKM.war
  • Review file descriptor limit and, eventually, increase it.
  • Start Tomcat again
  • Check for database errors:
$ grep "ERROR .*hbm2ddl" $TOMCAT_HOME/logs/catalina.log
  • Go to Administration > Configuration and replace these extractors:
org.apache.jackrabbit.extractor.PlainTextExtractor
org.apache.jackrabbit.extractor.MsWordTextExtractor
org.apache.jackrabbit.extractor.MsExcelTextExtractor
org.apache.jackrabbit.extractor.MsPowerPointTextExtractor
org.apache.jackrabbit.extractor.OpenOfficeTextExtractor
org.apache.jackrabbit.extractor.RTFTextExtractor
org.apache.jackrabbit.extractor.HTMLTextExtractor
org.apache.jackrabbit.extractor.XMLTextExtractor
org.apache.jackrabbit.extractor.PngTextExtractor
org.apache.jackrabbit.extractor.MsOutlookTextExtractor

By these others:

com.openkm.extractor.PlainTextExtractor
com.openkm.extractor.MsWordTextExtractor
com.openkm.extractor.MsExcelTextExtractor
com.openkm.extractor.MsPowerPointTextExtractor
com.openkm.extractor.OpenOfficeTextExtractor
com.openkm.extractor.RTFTextExtractor
com.openkm.extractor.HTMLTextExtractor
com.openkm.extractor.XMLTextExtractor
com.openkm.extractor.PngTextExtractor
com.openkm.extractor.MsOutlookTextExtractor
  • Enjoy OpenKM 6.4.1!

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