Difference between revisions of "Migrating from 6.2.5 to 6.3"

From OpenKM Documentation
Jump to: navigation, search
Line 12: Line 12:
  
 
* Run from your preferred SQL client these queries:
 
* Run from your preferred SQL client these queries:
 +
 +
'''MySQL'''
 +
<source lang="sql">
 +
ALTER TABLE OKM_MIME_TYPE ADD COLUMN MT_SEARCH char(1);
 +
UPDATE OKM_MIME_TYPE SET MT_SEARCH='T';
 +
ALTER TABLE OKM_MIME_TYPE MODIFY COLUMN MT_SEARCH char(1) NOT NULL;
 +
</source>
  
 
'''PostgreSQL'''
 
'''PostgreSQL'''

Revision as of 14:16, 22 May 2014


Nota clasica.png This section is currently under development.


Nota advertencia.png There's a problem when you update a table adding a new column with a "not null" constraint, if the table already has some rows. With MySQL and PostgreSQL can be solved connecting directly to your database. With HSQL - which is an embeded database - we suggest going to OpenKM go to Administration > Database Query and execute the database update.

  • 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:

MySQL

ALTER TABLE OKM_MIME_TYPE ADD COLUMN MT_SEARCH char(1);
UPDATE OKM_MIME_TYPE SET MT_SEARCH='T';
ALTER TABLE OKM_MIME_TYPE MODIFY COLUMN MT_SEARCH char(1) NOT NULL;

PostgreSQL

ALTER TABLE OKM_MIME_TYPE ADD COLUMN MT_SEARCH char(1);
UPDATE OKM_MIME_TYPE SET MT_SEARCH='T';
ALTER TABLE OKM_MIME_TYPE ALTER COLUMN MT_SEARCH SET NOT NULL;
  • Start Tomcat again
  • Go to Administration > Database Query, and remove obsolete configuration properties:

HSQL

ALTER TABLE OKM_MIME_TYPE ADD COLUMN MT_SEARCH char(1);
UPDATE OKM_MIME_TYPE SET MT_SEARCH='T';
ALTER TABLE OKM_MIME_TYPE ALTER COLUMN MT_SEARCH SET NOT NULL;
  • Enjoy OpenKM 6.3.0!

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