OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



OJS 2.2 docs/UPGRADE

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.

OJS 2.2 docs/UPGRADE

Postby rmichael » Mon Oct 15, 2007 4:07 pm

The docs/UPGRADE file hasn't been updated with any specific information regarding 2.2.

I would like to use a copy of our current database. May I simply dump it (e.g. pg_dump to create an SQL backup file), run it through something naive like "sed 's/<DB_NAME>/<NEW_TEST_DBNAME>'" and load it to create a new db; or has the database structure changed enough such that an intelligent migration tool is required?


Also, is there a topic/thread for 2.2 discussion (not filing bugs; I'll use bugzilla), or should we continue in the "OJS 2.2 Testers" topic?

Thanks.
rmichael
 
Posts: 113
Joined: Fri Mar 30, 2007 3:32 pm

Re: OJS 2.2 docs/UPGRADE

Postby asmecher » Mon Oct 15, 2007 4:48 pm

Hi Richard,

I've updated the docs/UPGRADE file -- if you're upgrading from e.g. OJS 2.1.1, you should follow these steps so as not to destroy your existing installation:
  • Back up your existing installation. (Boilerplate; please do it.)
  • Use pg_dump or mysqldump to dump your 2.1.1 database to a file; there should be options to pg_dump that will cause it to omit database names in its statements so that you won't have to do any munging of the dump file. The mysqldump tool does this by default, but I'm not sure about pg_dump OTOH.
  • Create a new database and load the dump file into it.
  • Duplicate your files path so that the new install doesn't toy with the old install's files.
  • Get a CVS checkout of ojs2 in a new directory on your web server.
  • Copy config.TEMPLATE.inc.php to config.inc.php
  • Configure config.inc.php with your new database connection parameters, your files path, and anything else you need (e.g. sha1 vs. md5 for password encryption to match your old install).
  • Use the tools/upgrade.php tool to upgrade the database. (The usual suspects that cause trouble here are memory and time limits configured in php.ini; if you encounter one of these, it's probably best to destroy and reload your 2.1.1 database, as the halfway-upgraded one will be difficult to debug.)
  • Set "configured" to "On" in config.inc.php if you hadn't already
  • Test!
Hope that helps.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8316
Joined: Wed Aug 10, 2005 12:56 pm

Re: OJS 2.2 docs/UPGRADE

Postby rmichael » Mon Oct 15, 2007 5:11 pm

Thanks Alec, nice and succinct. I'm about halfway through this already.. I'll finish up using the steps you've provided.

Aside, I don't see any updates to docs/release-notes/ChangeLog-2.2, although of course diff shows me lots has changed. Where can I find notes about what the fixes have addressed?
rmichael
 
Posts: 113
Joined: Fri Mar 30, 2007 3:32 pm

Re: OJS 2.2 docs/UPGRADE

Postby asmecher » Mon Oct 15, 2007 5:33 pm

Hi Richard,

We generate the final changelist as part of the build process, so the one that's currently in CVS is outdated. You can generate an up-to-date one using tools/cvs2cl.pl; instructions on using it are in docs/dev/RELEASE.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8316
Joined: Wed Aug 10, 2005 12:56 pm

Re: OJS 2.2 docs/UPGRADE

Postby rmichael » Mon Oct 22, 2007 11:09 am

Alec,

I'm returning to testing the new OJS installation.

I created a new test user and test database, then dumped and loaded our OJS installation into the new test database as follows:

As postgres admin:
createuser -d -R -S -P ojs_test
createdb -T template0 -h localhost -U ojs_test -W ojs_test

As an account with privledges on the existing database:
(*If anyone is copying this, your "pg_dump" might need connection parameters -- i.e. -h <hostname>, -U <username>, etc..)
pg_dump --no-owner <DBNAME> | psql -h localhost -U ojs_test -W ojs_test

I verify my database connection parameters in config.inc.php to be sure..

Then ran the upgrade tool, as conservatively as possible:
(Aside, it would be nice is these commands outputted the username, database name, etc.)
php upgrade.php check
php upgrade.php upgrade pretend

I receive the following error:

------ SNIP -----------------
localhost$ php upgrade.php upgrade pretend
[load: upgrade.xml]
[version: 2.2.0.0]
[data: upgrade/2.2.0_preupdate.xml]
[code: Installer Installer::correctCurrencies]
[code: Installer Installer::migrateIssueLabelAndSettings]
<h1>DB Error: ERROR: column "show_volume" of relation "issues" does not exist
LINE 1: UPDATE issues SET show_volume=0, show_number=0, show_year=0,...
^</h1>OJS: DB Error: ERROR: column "show_volume" of relation "issues" does not exist
LINE 1: UPDATE issues SET show_volume=0, show_number=0, show_year=0,...
------ SNIP -----------------

Reading dbscripts/xml/upgrade/2.2.0_preupdate.xml, it appears the "query" commands for the Postgres driver are matching against "postgres7". However, the "driver = ..." string in config.inc.php is simply "postgres". If the match is failing, the presumably the "ALTER TABLE" commands are not being executed, resulting in the "column does not exist" error above. Can you comment on this? .. I'm just guessing.. and will dig more.
rmichael
 
Posts: 113
Joined: Fri Mar 30, 2007 3:32 pm

Re: OJS 2.2 docs/UPGRADE

Postby asmecher » Mon Oct 22, 2007 12:03 pm

Hi Richard,

Could you replace the "postgres7" in those statements to "postgres" and see if you're able to successfully run the upgrade?

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8316
Joined: Wed Aug 10, 2005 12:56 pm

Re: OJS 2.2 docs/UPGRADE

Postby rmichael » Mon Oct 22, 2007 1:34 pm

Alec,

I changed the code as you suggested, without success.

I turned postgres logging way up, and don't see the ALTER statements executing at all.

I'll begin reading some of the code more closely and/or turn up PHP logging as well.

Richard
rmichael
 
Posts: 113
Joined: Fri Mar 30, 2007 3:32 pm

Re: OJS 2.2 docs/UPGRADE

Postby asmecher » Mon Oct 22, 2007 2:06 pm

Hi Richard,

Unfortunately we don't have a lot of PostgreSQL test data, so our testing has been pretty limited. However, I'll see what I can stir up, and if you're able to investigate further, that would be much appreciated. Would you be willing to send us a database dump of your OJS 2.1.1 install with PostgreSQL?

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8316
Joined: Wed Aug 10, 2005 12:56 pm


Return to OJS Development

Who is online

Users browsing this forum: No registered users and 2 guests