Difference between revisions of "Knowledge:Migration from 5.1.10 to 6.0"

From OpenKM Documentation
Jump to: navigation, search
m
Line 3: Line 3:
 
Configuration property '''logo.text''' has been renamed to '''logo.banner'''.
 
Configuration property '''logo.text''' has been renamed to '''logo.banner'''.
  
 +
== Authentication stuff ==
 +
* Log into OpenKM 5.1.10 and go to '''Administration''' > '''Database query''' and execute these sentences in order to export users and roles:
 +
 +
=== Hypersonic ===
 
<source lang="sql">
 
<source lang="sql">
UPDATE OKM_TRANSLATION SET TR_KEY='general.menu.bookmark.add' WHERE TR_KEY='filebrowser.menu.add.bookmark';
+
SELECT 'INSERT INTO OKM_USER (USR_ID, USR_NAME, USR_PASSWORD, USR_EMAIL, USR_ACTIVE) VALUES (''' + USR_ID + ''', ''' + USR_NAME + ''', ''' + USR_PASSWORD + ''', ''' + USR_EMAIL + ''', ''' + CASEWHEN(USR_ACTIVE,'T', 'F') + ''');' from OKM_USER;
UPDATE OKM_TRANSLATION SET TR_KEY='general.menu.edit.add.property.group' WHERE TR_KEY='filebrowser.menu.add.property.group';
+
SELECT 'INSERT INTO OKM_ROLE (ROL_ID, ROL_ACTIVE) VALUES (''' + ROL_ID + ''', ''' + CASEWHEN(ROL_ACTIVE, 'T', 'F') + ''');' from OKM_ROLE;
UPDATE OKM_TRANSLATION SET TR_KEY='general.menu.file.export' WHERE TR_KEY='filebrowser.menu.export';
+
SELECT 'INSERT INTO OKM_USER_ROLE (UR_USER, UR_ROLE) VALUES (''' + UR_USER + ''', ''' + UR_ROLE + ''');' FROM OKM_USER_ROLE;
UPDATE OKM_TRANSLATION SET TR_KEY='general.menu.edit.lock' WHERE TR_KEY='general.menu.file.lock';
 
UPDATE OKM_TRANSLATION SET TR_KEY='general.menu.edit.unlock' WHERE TR_KEY='general.menu.file.unlock';
 
UPDATE OKM_TRANSLATION SET TR_KEY='general.menu.edit.checkout' WHERE TR_KEY='general.menu.file.checkout';
 
UPDATE OKM_TRANSLATION SET TR_KEY='general.menu.edit.checkin' WHERE TR_KEY='general.menu.file.checkin';
 
UPDATE OKM_TRANSLATION SET TR_KEY='general.menu.edit.cancel.checkout' WHERE TR_KEY='general.menu.file.cancel.checkout';
 
UPDATE OKM_TRANSLATION SET TR_KEY='general.menu.edit.delete' WHERE TR_KEY='general.menu.file.delete';
 
UPDATE OKM_TRANSLATION SET TR_KEY='general.menu.edit.copy' WHERE TR_KEY='filebrowser.menu.copy';
 
UPDATE OKM_TRANSLATION SET TR_KEY='general.menu.edit.move' WHERE TR_KEY='filebrowser.menu.move';
 
UPDATE OKM_TRANSLATION SET TR_KEY='general.menu.edit.rename' WHERE TR_KEY='filebrowser.menu.rename';
 
UPDATE OKM_TRANSLATION SET TR_KEY='general.menu.edit.remove.property.group' WHERE TR_KEY='filebrowser.menu.remove.property.group';
 
UPDATE OKM_TRANSLATION SET TR_KEY='general.menu.tools.debug.console' WHERE TR_KEY='general.menu.debug.console';
 
UPDATE OKM_TRANSLATION SET TR_KEY='general.menu.tools.administration' WHERE TR_KEY='general.menu.administration';
 
UPDATE OKM_TRANSLATION SET TR_KEY='general.menu.help.documentation' WHERE TR_KEY='general.menu.documentation';
 
UPDATE OKM_TRANSLATION SET TR_KEY='general.menu.help.report' WHERE TR_KEY='general.menu.bug.report';
 
UPDATE OKM_TRANSLATION SET TR_KEY='general.menu.help.support.request' WHERE TR_KEY='general.menu.support.request';
 
UPDATE OKM_TRANSLATION SET TR_KEY='general.menu.help.public.forum' WHERE TR_KEY='general.menu.public.forum';
 
UPDATE OKM_TRANSLATION SET TR_KEY='general.menu.help.version.changes' WHERE TR_KEY='general.menu.version.changes';
 
UPDATE OKM_TRANSLATION SET TR_KEY='general.menu.help.project.web' WHERE TR_KEY='general.menu.project.web';
 
UPDATE OKM_TRANSLATION SET TR_KEY='general.menu.help.about' WHERE TR_KEY='general.menu.about';
 
UPDATE OKM_TRANSLATION SET TR_KEY='general.menu.edit.add.subscription' WHERE TR_KEY='filebrowser.menu.add.subscription';
 
UPDATE OKM_TRANSLATION SET TR_KEY='general.menu.edit.remove.subscription' WHERE TR_KEY='filebrowser.menu.remove.subscription';
 
UPDATE OKM_TRANSLATION SET TR_KEY='general.menu.file.find.folder' WHERE TR_KEY='tree.menu.directory.find.folder';
 
UPDATE OKM_TRANSLATION SET TR_KEY='general.menu.file.find.document' WHERE TR_KEY='tree.menu.directory.find.document';
 
UPDATE OKM_TRANSLATION SET TR_KEY='general.menu.file.restore' WHERE TR_KEY='trash.menu.directory.restore';
 
UPDATE OKM_TRANSLATION SET TR_KEY='general.menu.file.purge' WHERE TR_KEY='trash.menu.directory.purge';
 
UPDATE OKM_TRANSLATION SET TR_KEY='general.menu.file.start.workflow' WHERE TR_KEY='filebrowser.menu.start.workflow';
 
UPDATE OKM_TRANSLATION SET TR_KEY='general.menu.file.create.from.template' WHERE TR_KEY='filebrowser.menu.create.from.template';
 
UPDATE OKM_TRANSLATION SET TR_KEY='general.menu.edit.add.note' WHERE TR_KEY='document.add.note';
 
 
</source>
 
</source>
 +
 +
=== MySQL ===
 +
<source lang="sql">
 +
SELECT CONCAT('INSERT INTO OKM_USER (USR_ID, USR_NAME, USR_PASSWORD, USR_EMAIL, USR_ACTIVE) VALUES (''', USR_ID, ''', ''', USR_NAME, ''', ''', USR_PASSWORD, ''', ''', USR_EMAIL, ''', ''', IF(USR_ACTIVE IS TRUE,'T', 'F'), ''');') from OKM_USER;
 +
SELECT CONCAT('INSERT INTO OKM_ROLE (ROL_ID, ROL_ACTIVE) VALUES (''', ROL_ID, ''', ''', IF(ROL_ACTIVE IS TRUE, 'T', 'F'), ''');') from OKM_ROLE;
 +
SELECT CONCAT('INSERT INTO OKM_USER_ROLE (UR_USER, UR_ROLE) VALUES (''', UR_USER, ''', ''', UR_ROLE, ''');') from OKM_USER_ROLE;
 +
</source>
 +
 +
=== PostgreSQL ===
 +
<source lang="sql">
 +
SELECT 'INSERT INTO OKM_USER (USR_ID, USR_NAME, USR_PASSWORD, USR_EMAIL, USR_ACTIVE) VALUES (''' || USR_ID || ''', ''' || USR_NAME || ''', ''' || USR_PASSWORD || ''', ''' || USR_EMAIL || ''', ''' || CASE WHEN USR_ACTIVE=1 THEN 'T' ELSE 'F' END || ''');' from OKM_USER;
 +
SELECT 'INSERT INTO OKM_ROLE (ROL_ID, ROL_ACTIVE) VALUES (''' || ROL_ID || ''', ''' || CASE WHEN ROL_ACTIVE=1 THEN 'T' ELSE 'F' END || ''');' from OKM_ROLE;
 +
SELECT 'INSERT INTO OKM_USER_ROLE (UR_USER, UR_ROLE) VALUES (''' || UR_USER || ''', ''' || UR_ROLE || ''');' from OKM_USER_ROLE;</source>
 +
 +
=== Oracle ===
 +
<source lang="sql">
 +
SELECT 'INSERT INTO OKM_USER (USR_ID, USR_NAME, USR_PASSWORD, USR_EMAIL, USR_ACTIVE) VALUES (''' || USR_ID || ''', ''' || USR_NAME || ''', ''' || USR_PASSWORD || ''', ''' || USR_EMAIL || ''', ''' || DECODE(USR_ACTIVE, 1, 'T', 'F') || ''');' from OKM_USER;
 +
SELECT 'INSERT INTO OKM_ROLE (ROL_ID, ROL_ACTIVE) VALUES (''' || ROL_ID || ''', ''' || DECODE(ROL_ACTIVE, 1, 'T', 'F') || ''');' from OKM_ROLE;
 +
SELECT 'INSERT INTO OKM_USER_ROLE (UR_USER, UR_ROLE) VALUES (''' || UR_USER || ''', ''' || UR_ROLE || ''');' from OKM_USER_ROLE;</source>
 +
 +
* Copy the output of these sentences to a secure place.
 +
* Execute the resulting SQL sentences in the OpenKM 6.0 installation.

Revision as of 07:02, 16 July 2012


Nota clasica.png OpenKM 6.0 Community is not officially released, but you can download a beta soon.

Configuration property logo.text has been renamed to logo.banner.

Authentication stuff

  • Log into OpenKM 5.1.10 and go to Administration > Database query and execute these sentences in order to export users and roles:

Hypersonic

SELECT 'INSERT INTO OKM_USER (USR_ID, USR_NAME, USR_PASSWORD, USR_EMAIL, USR_ACTIVE) VALUES (''' + USR_ID + ''', ''' + USR_NAME + ''', ''' + USR_PASSWORD + ''', ''' + USR_EMAIL + ''', ''' + CASEWHEN(USR_ACTIVE,'T', 'F') + ''');' from OKM_USER;
SELECT 'INSERT INTO OKM_ROLE (ROL_ID, ROL_ACTIVE) VALUES (''' + ROL_ID + ''', ''' + CASEWHEN(ROL_ACTIVE, 'T', 'F') + ''');' from OKM_ROLE;
SELECT 'INSERT INTO OKM_USER_ROLE (UR_USER, UR_ROLE) VALUES (''' + UR_USER + ''', ''' + UR_ROLE + ''');' FROM OKM_USER_ROLE;

MySQL

SELECT CONCAT('INSERT INTO OKM_USER (USR_ID, USR_NAME, USR_PASSWORD, USR_EMAIL, USR_ACTIVE) VALUES (''', USR_ID, ''', ''', USR_NAME, ''', ''', USR_PASSWORD, ''', ''', USR_EMAIL, ''', ''', IF(USR_ACTIVE IS TRUE,'T', 'F'), ''');') from OKM_USER;
SELECT CONCAT('INSERT INTO OKM_ROLE (ROL_ID, ROL_ACTIVE) VALUES (''', ROL_ID, ''', ''', IF(ROL_ACTIVE IS TRUE, 'T', 'F'), ''');') from OKM_ROLE;
SELECT CONCAT('INSERT INTO OKM_USER_ROLE (UR_USER, UR_ROLE) VALUES (''', UR_USER, ''', ''', UR_ROLE, ''');') from OKM_USER_ROLE;

PostgreSQL

SELECT 'INSERT INTO OKM_USER (USR_ID, USR_NAME, USR_PASSWORD, USR_EMAIL, USR_ACTIVE) VALUES (''' || USR_ID || ''', ''' || USR_NAME || ''', ''' || USR_PASSWORD || ''', ''' || USR_EMAIL || ''', ''' || CASE WHEN USR_ACTIVE=1 THEN 'T' ELSE 'F' END || ''');' from OKM_USER;
SELECT 'INSERT INTO OKM_ROLE (ROL_ID, ROL_ACTIVE) VALUES (''' || ROL_ID || ''', ''' || CASE WHEN ROL_ACTIVE=1 THEN 'T' ELSE 'F' END || ''');' from OKM_ROLE;
SELECT 'INSERT INTO OKM_USER_ROLE (UR_USER, UR_ROLE) VALUES (''' || UR_USER || ''', ''' || UR_ROLE || ''');' from OKM_USER_ROLE;

Oracle

SELECT 'INSERT INTO OKM_USER (USR_ID, USR_NAME, USR_PASSWORD, USR_EMAIL, USR_ACTIVE) VALUES (''' || USR_ID || ''', ''' || USR_NAME || ''', ''' || USR_PASSWORD || ''', ''' || USR_EMAIL || ''', ''' || DECODE(USR_ACTIVE, 1, 'T', 'F') || ''');' from OKM_USER;
SELECT 'INSERT INTO OKM_ROLE (ROL_ID, ROL_ACTIVE) VALUES (''' || ROL_ID || ''', ''' || DECODE(ROL_ACTIVE, 1, 'T', 'F') || ''');' from OKM_ROLE;
SELECT 'INSERT INTO OKM_USER_ROLE (UR_USER, UR_ROLE) VALUES (''' || UR_USER || ''', ''' || UR_ROLE || ''');' from OKM_USER_ROLE;
  • Copy the output of these sentences to a secure place.
  • Execute the resulting SQL sentences in the OpenKM 6.0 installation.