Merge 2 databases

OJS development discussion, enhancement requests, third-party patches and plug-ins.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
The Public Knowledge Project Support Forum is moving to

This forum will be maintained permanently as an archived historical resource, but all new questions should be added to the new forum. Questions will no longer be monitored on this old forum after March 30, 2015.
Posts: 44
Joined: Fri Sep 15, 2006 4:40 pm

Merge 2 databases

Postby agentsmith » Thu Feb 01, 2007 2:44 pm

Hi ,

I am wondering what it would take to merge 2 OJS databases together.
I was thinking of incrementing all primary/foreign keys of one database by the max+1 IDs of the second database. What other things should I be considering? Is there an Entity Relationship Diagram for the database somewhere?


Posts: 10015
Joined: Wed Aug 10, 2005 12:56 pm

Postby asmecher » Thu Feb 01, 2007 3:33 pm

Hi agentsmith,

Sorry, we don't have an e-r diagram, but the database columns are all logically-named (i.e.article_id in one table will always map to an article_id in the articles table). The only tricky parts are:[list][*]Depending on your DBMS, you may need to set auto-increment sequences so that they don't carry on incrementing, potentially overwriting your merged-in IDs.[*]There are a few columns named assoc_id in the database; these will map to IDs in different tables depending on the associated type / assoc_type columns.

Have you had a look at the technical reference? It's available from the "Documentation" section of the OJS website.

If you only need to keep your published content (i.e. workflow and other data isn't important), you could consider exporting and importing via the Import/Export interface.

Alec Smecher
Open Journal Systems Team
Don't miss the First International PKP Scholarly Publishing Conference
July 11 - 13, 2007, Vancouver, BC, Canada

Posts: 44
Joined: Fri Sep 15, 2006 4:40 pm

Postby agentsmith » Wed Feb 07, 2007 6:23 pm

Thanks for your help. Turns out the export feature was all that was needed.

Return to “OJS Development”

Who is online

Users browsing this forum: No registered users and 1 guest