Difference between revisions of "Knowledge:Migration from 6.2.1 to 6.2.2"

From OpenKM Documentation
Jump to: navigation, search
m
 
(14 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
* See [http://issues.openkm.com/changelog_page.php?version_id=51 changelog at Mantis]
 +
 +
* Download update from http://openkm.com/download/okm/OpenKM-6.2.2.zip (eMpg8eIjY5)
 +
 
* Make a backup!!!
 
* Make a backup!!!
  
Line 8: Line 12:
  
 
* Run from your preferred SQL client these queries:
 
* Run from your preferred SQL client these queries:
 +
 +
{{Note|The '''NDC_SIGNED''' field won't be created until OpenKM 6.2.2 is started.}}
 +
 +
'''HSQL'''
 +
<source lang="sql">
 +
ALTER TABLE OKM_NODE_MAIL ALTER COLUMN NML_CONTENT clob;
 +
update OKM_NODE_DOCUMENT set NDC_SIGNED='F';
 +
</source>
  
 
'''MySQL'''
 
'''MySQL'''
 
<source lang="sql">
 
<source lang="sql">
ALTER TABLE OKM_NODE_MAIL MODIFY NML_CONTENT LONGTEXT
+
alter table OKM_NODE_MAIL modify NML_CONTENT longtext;
 +
update OKM_NODE_DOCUMENT set NDC_SIGNED='F';
 
</source>
 
</source>
  
 
'''PostgreSQL'''
 
'''PostgreSQL'''
 
<source lang="sql">
 
<source lang="sql">
ALTER TABLE OKM_NODE_MAIL ALTER NML_CONTENT TYPE TEXT
+
alter table OKM_NODE_MAIL alter NML_CONTENT TYPE text;
 +
update OKM_NODE_DOCUMENT set NDC_SIGNED='F';
 +
</source>
 +
 
 +
If fails try this:
 +
 
 +
<source lang="sql">
 +
alter table OKM_NODE_DOCUMENT add column NDC_SIGNED char(1);
 +
update OKM_NODE_DOCUMENT set NDC_SIGNED='F';
 
</source>
 
</source>
  
 
'''Oracle'''
 
'''Oracle'''
 
<source lang="sql">
 
<source lang="sql">
ALTER TABLE OKM_NODE_MAIL MODIFY (NML_CONTENT CLOB);
+
alter table OKM_NODE_MAIL modify (NML_CONTENT clob);
 +
update OKM_NODE_DOCUMENT set NDC_SIGNED='F';
 +
</source>
 +
 
 +
If the ALTER TABLE sentence fails in Oracle with ORA-22858, you have another way:
 +
 
 +
<source lang="sql">
 +
alter table OKM_NODE_MAIL add NML_CONTENT_TMP CLOB;
 +
update OKM_NODE_MAIL set NML_CONTENT_TMP = NML_CONTENT;
 +
alter table OKM_NODE_MAIL drop NML_CONTENT;
 +
alter table OKM_NODE_MAIL rename NML_CONTENT_TMP to NML_CONTENT;
 +
</source>
 +
 
 +
Oracle won't add the new NDC_SIGNED column because of this error:
 +
 
 +
ORA-01758: table must be empty to add mandatory (NOT NULL) column
 +
 
 +
So you need to add it manually:
 +
 
 +
<source lang="sql">
 +
alter table OKM_NODE_DOCUMENT add NDC_SIGNED CHAR(1);
 +
update OKM_NODE_DOCUMENT set NDC_SIGNED='F';
 
</source>
 
</source>
  
Line 35: Line 77:
 
And start Tomcat again.
 
And start Tomcat again.
  
Also is recommended to clear browser cache and [http://www.java.com/en/download/help/plugin_cache.xml Java Plugin cache].
+
{{Note|Recommended to clear browser cache and [http://www.java.com/en/download/help/plugin_cache.xml Java Plugin cache]}}

Latest revision as of 11:07, 18 January 2013

  • Make a backup!!!
  • Stop Tomcat
  • Edit OpenKM.cfg and set hibernate.hbm2ddl to update
  • Replace the OpenKM.war
  • Run from your preferred SQL client these queries:

Nota clasica.png The NDC_SIGNED field won't be created until OpenKM 6.2.2 is started.

HSQL

ALTER TABLE OKM_NODE_MAIL ALTER COLUMN NML_CONTENT clob;
update OKM_NODE_DOCUMENT set NDC_SIGNED='F';

MySQL

alter table OKM_NODE_MAIL modify NML_CONTENT longtext;
update OKM_NODE_DOCUMENT set NDC_SIGNED='F';

PostgreSQL

alter table OKM_NODE_MAIL alter NML_CONTENT TYPE text;
update OKM_NODE_DOCUMENT set NDC_SIGNED='F';

If fails try this:

alter table OKM_NODE_DOCUMENT add column NDC_SIGNED char(1);
update OKM_NODE_DOCUMENT set NDC_SIGNED='F';

Oracle

alter table OKM_NODE_MAIL modify (NML_CONTENT clob);
update OKM_NODE_DOCUMENT set NDC_SIGNED='F';

If the ALTER TABLE sentence fails in Oracle with ORA-22858, you have another way:

alter table OKM_NODE_MAIL add NML_CONTENT_TMP CLOB;
update OKM_NODE_MAIL set NML_CONTENT_TMP = NML_CONTENT;
alter table OKM_NODE_MAIL drop NML_CONTENT;
alter table OKM_NODE_MAIL rename NML_CONTENT_TMP to NML_CONTENT;

Oracle won't add the new NDC_SIGNED column because of this error:

ORA-01758: table must be empty to add mandatory (NOT NULL) column

So you need to add it manually:

alter table OKM_NODE_DOCUMENT add NDC_SIGNED CHAR(1);
update OKM_NODE_DOCUMENT set NDC_SIGNED='F';
  • Start Tomcat again
  • Enjoy OpenKM 6.2.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