Query Utils

From OpenKM Documentation
Revision as of 17:39, 11 September 2012 by Jllort (talk | contribs)

Jump to: navigation, search

Here are some queries that could be useful for migration.

Save OKM_CONFIG table values

Creates update script with actual OKM_CONFIG table values to be restored in new OpenKM database;

select  'UPDATE OKM_CONFIG SET CFG_VALUE=''' ||  CFG_VALUE || ''' WHERE CFG_KEY=''' || CFG_KEY || '''' from OKM_CONFIG;

Tested: OpenKM (6.x) Database (MySQL).

Looking for OKM_ACTIVITY document history

Looking for creation of some document named /okm_root:/employees/8526. employe_name.pdf

select * from OKM_ACTIVITY where ACT_ACTION="CREATE_DOCUMENT" and ACT_PARAMS LIKE "%/employees/8526%";

Looking for when has been deleted of some document named /okm_root:/employees/8526. employe_name.pdf

select * from OKM_ACTIVITY where ACT_ACTION="DELETE_DOCUMENT" and ACT_PARAMS LIKE "%/employees/8526%";

Looking for all the activity log of the document

select * from OKM_ACTIVITY where ACT_PARAMS LIKE "%/employees/8526%";


Tested: OpenKM (5.x) Database (MySQL).