Difference between revisions of "Migration from 5.1.11 to 6.2"
From OpenKM Documentation
(9 intermediate revisions by one other user not shown) | |||
Line 2: | Line 2: | ||
* Configuration property '''logo.text''' has been renamed to '''logo.banner'''. | * Configuration property '''logo.text''' has been renamed to '''logo.banner'''. | ||
− | * Log into OpenKM 5.1 and go to Administration > Repository export. If you want to preserver document and folder metadata, please check the metadata option. | + | * Log into OpenKM 5.1.11 and go to Administration > Repository export. If you want to preserver document and folder metadata, please check the metadata option. |
== Authentication stuff == | == Authentication stuff == | ||
− | * Log into OpenKM 5.1. | + | * Log into OpenKM 5.1.11 and go to '''Administration''' > '''Database query''' and execute these sentences in order to export users and roles: |
=== Hypersonic === | === Hypersonic === | ||
Line 40: | Line 40: | ||
</source> | </source> | ||
* Execute the resulting SQL sentences in the OpenKM 6.2 installation. | * Execute the resulting SQL sentences in the OpenKM 6.2 installation. | ||
+ | |||
+ | == Reindexing repository == | ||
+ | Go to '''administration''' -> '''Utilities'''. Select '''Rebuild indexers''' and then '''Lucene indexes''' checkbox. | ||
+ | |||
+ | == Metadata == | ||
+ | If you got metadata date values then you should change from older 5.1.x format to new 6.x date format values, otherside you will get some error. The 5.1.x format to store data is "yyyy-MM-ddTHH:mm:ss.SSSZZZ", new 6.x format is "yyyyMMddHHmmss". In version 6.x values are stored in table OKM_NODE_PROPERTY, simply update older values format to new values format in this database. | ||
+ | |||
+ | === MySQL === | ||
+ | <source lang="sql"> | ||
+ | UPDATE OKM_NODE_PROPERTY set NPG_VALUE=REPLACE(NPG_VALUE,'-','') WHERE NPG_NAME='your_property_name_here'; | ||
+ | UPDATE OKM_NODE_PROPERTY set NPG_VALUE=REPLACE(NPG_VALUE,':','') WHERE NPG_NAME='your_property_name_here'; | ||
+ | UPDATE OKM_NODE_PROPERTY set NPG_VALUE=CONCAT(SUBSTRING(NPG_VALUE,1,8),SUBSTRING(NPG_VALUE,10,6)) WHERE NPG_NAME='okp:consulting.name'; | ||
+ | </source> | ||
+ | |||
+ | == Profile stuff == | ||
+ | Unfortunatelly there's no way to migrate from older profile table to newer. Profiles should be created manually in OpenKM 6.2 with same order has been created in OpenKM version 5.1.11. After it, we can restore user profile configuration. | ||
+ | * Log into OpenKM 5.1.11 and go to '''Administration''' > '''Database query''' and execute these sentences in order to export user profile configuration. | ||
+ | |||
+ | === MySQL === | ||
+ | <source lang="sql"> | ||
+ | SELECT CONCAT('INSERT INTO OKM_USER_CONFIG (UC_USER, UC_HOME_PATH, UC_HOME_NODE, UC_HOME_TYPE, UC_PROFILE) VALUES (''', UC_USER, ''', ''', UC_HOME_PATH, ''', ''', UC_HOME_UUID, ''', ''', UC_HOME_TYPE, ''', ''', UC_PROFILE, ''');') FROM OKM_USER_CONFIG; | ||
+ | </source> | ||
+ | |||
+ | * Execute the resulting SQL sentences in the OpenKM 6.2 installation. | ||
+ | |||
+ | [[Category: Migration Guide]] |
Latest revision as of 12:50, 9 February 2013
- Configuration property logo.text has been renamed to logo.banner.
- Log into OpenKM 5.1.11 and go to Administration > Repository export. If you want to preserver document and folder metadata, please check the metadata option.
Authentication stuff
- Log into OpenKM 5.1.11 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 + ''', ''' + USR_ACTIVE + ''');' from OKM_USER;
SELECT 'INSERT INTO OKM_ROLE (ROL_ID, ROL_ACTIVE) VALUES (''ROLE_' + ROL_ID + ''', ''' + ROL_ACTIVE + ''');' from OKM_ROLE;
SELECT 'INSERT INTO OKM_USER_ROLE (UR_USER, UR_ROLE) VALUES (''' + UR_USER + ''', ''ROLE_' + 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, ''', ''', USR_ACTIVE, ''');') from OKM_USER;
SELECT CONCAT('INSERT INTO OKM_ROLE (ROL_ID, ROL_ACTIVE) VALUES (''ROLE_', ROL_ID, ''', ''', ROL_ACTIVE, ''');') from OKM_ROLE;
SELECT CONCAT('INSERT INTO OKM_USER_ROLE (UR_USER, UR_ROLE) VALUES (''', UR_USER, ''', ''ROLE_', 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 || ''', ''' || USR_ACTIVE || ''');' from OKM_USER;
SELECT 'INSERT INTO OKM_ROLE (ROL_ID, ROL_ACTIVE) VALUES (''ROLE_' || ROL_ID || ''', ''' || ROL_ACTIVE || ''');' from OKM_ROLE;
SELECT 'INSERT INTO OKM_USER_ROLE (UR_USER, UR_ROLE) VALUES (''' || UR_USER || ''', ''ROLE_' || UR_ROLE || ''');' from OKM_USER_ROLE;
- Update the roles with a SQL sentence (select one depending on your database SQL dialect):
-- Common
update OKM_NODE_ROLE_PERMISSION set NRP_ROLE='ROLE_USER' where NRP_ROLE = 'UserRole';
update OKM_NODE_ROLE_PERMISSION set NRP_ROLE='ROLE_ADMIN' where NRP_ROLE = 'AdminRole';
-- MySQL
update OKM_NODE_ROLE_PERMISSION set NRP_ROLE=concat('ROLE_', NRP_ROLE) where NRP_ROLE not like 'ROLE_%';
-- PostgreSQL
update OKM_NODE_ROLE_PERMISSION set NRP_ROLE='ROLE_' || NRP_ROLE where NRP_ROLE not like 'ROLE_%';
- Execute the resulting SQL sentences in the OpenKM 6.2 installation.
Reindexing repository
Go to administration -> Utilities. Select Rebuild indexers and then Lucene indexes checkbox.
Metadata
If you got metadata date values then you should change from older 5.1.x format to new 6.x date format values, otherside you will get some error. The 5.1.x format to store data is "yyyy-MM-ddTHH:mm:ss.SSSZZZ", new 6.x format is "yyyyMMddHHmmss". In version 6.x values are stored in table OKM_NODE_PROPERTY, simply update older values format to new values format in this database.
MySQL
UPDATE OKM_NODE_PROPERTY set NPG_VALUE=REPLACE(NPG_VALUE,'-','') WHERE NPG_NAME='your_property_name_here';
UPDATE OKM_NODE_PROPERTY set NPG_VALUE=REPLACE(NPG_VALUE,':','') WHERE NPG_NAME='your_property_name_here';
UPDATE OKM_NODE_PROPERTY set NPG_VALUE=CONCAT(SUBSTRING(NPG_VALUE,1,8),SUBSTRING(NPG_VALUE,10,6)) WHERE NPG_NAME='okp:consulting.name';
Profile stuff
Unfortunatelly there's no way to migrate from older profile table to newer. Profiles should be created manually in OpenKM 6.2 with same order has been created in OpenKM version 5.1.11. After it, we can restore user profile configuration.
- Log into OpenKM 5.1.11 and go to Administration > Database query and execute these sentences in order to export user profile configuration.
MySQL
SELECT CONCAT('INSERT INTO OKM_USER_CONFIG (UC_USER, UC_HOME_PATH, UC_HOME_NODE, UC_HOME_TYPE, UC_PROFILE) VALUES (''', UC_USER, ''', ''', UC_HOME_PATH, ''', ''', UC_HOME_UUID, ''', ''', UC_HOME_TYPE, ''', ''', UC_PROFILE, ''');') FROM OKM_USER_CONFIG;
- Execute the resulting SQL sentences in the OpenKM 6.2 installation.