You are viewing the PKP Support Forum | PKP Home Wiki

Merge 2 databases

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

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

Forum rules
Developer Resources:

Documentation: The OJS Technical Reference and the OJS API Reference are both available from the OJS Documentation page.

Git: You can access our public Git Repository here. Comprehensive Git usage instructions are available on the wiki.

Bugzilla: You can access our Bugzilla report tracker here.

Search: You can use our Google Custom Search to search across our main website, the support forum, and Bugzilla.

Questions and discussion are welcome, but if you have a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a technical support question, try the OJS Technical Support subforum.

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: 44
Joined: Fri Sep 15, 2006 4:40 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: 9946
Joined: Wed Aug 10, 2005 12:56 pm

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

Thanks for your help. Turns out the export feature was all that was needed.
Posts: 44
Joined: Fri Sep 15, 2006 4:40 pm

Return to OJS Development

Who is online

Users browsing this forum: No registered users and 1 guest