OMP: upgrade beta => 1.2.0 database error

Hey there,

Where are doing the upgrade from beta to OMP 1.2.0 and we get another database error:

Errors occurred during installation:

A database error has occurred: Duplicate entry ‘512-1-0’ for key 'press_features_pkey’

What is the trick here to ignore that?

Greeting

Hi @ABDO,

If you’re able to use the command-line based upgrade script, try…

  • Restoring your database to its state before you tried to run the upgrade
  • Run the command-line upgrade script
  • Capture the output and post it here.

Note that we don’t formally support the OMP 1.0 beta, but I may be able to provide some guidance.

Regards,
Alec Smecher
Public Knowledge Project Team

thanks for helping… where do i get the the command-line upgrade script?

Hi @ABDO,

It’s included in OMP, but you’ll need to have secure shell (SSH) access to your sever or equivalent. See the very last section in docs/UPGRADE for some brief instructions on how to run the command-line upgrade script.

Regards,
Alec Smecher
Public Knowledge Project Team

outcome:

[pre-install]
[load: upgrade.xml]
[version: 1.2.0.0]
[code: Installer Installer::syncSeriesAssocType]
[data: dbscripts/xml/upgrade/1.1.0.0_preupdate.xml (skipped)]
[data: dbscripts/xml/upgrade/1.2.0.0_preupdate.xml (skipped)]
[schema: lib/pkp/xml/schema/common.xml]
[schema: lib/pkp/xml/schema/scheduledTasks.xml]
[schema: lib/pkp/xml/schema/temporaryFiles.xml]
[schema: lib/pkp/xml/schema/log.xml]
[schema: lib/pkp/xml/schema/notes.xml]
[schema: lib/pkp/xml/schema/controlledVocab.xml]
[schema: lib/pkp/xml/schema/metadata.xml]
[schema: lib/pkp/xml/schema/announcements.xml]
[schema: lib/pkp/xml/schema/reviews.xml]
[schema: lib/pkp/xml/schema/reviewForms.xml]
[schema: lib/pkp/xml/schema/submissions.xml]
[schema: lib/pkp/xml/schema/submissionFiles.xml]
[schema: lib/pkp/xml/schema/mutex.xml]
[schema: lib/pkp/xml/schema/tombstone.xml]
[schema: lib/pkp/xml/schema/genres.xml]
[schema: lib/pkp/xml/schema/rolesAndUserGroups.xml]
[schema: lib/pkp/xml/schema/views.xml]
[schema: lib/pkp/xml/schema/metrics.xml]
[schema: dbscripts/xml/omp_schema.xml]
ERROR: Upgrade failed: DB: Duplicate entry '512-1-0' for key 'press_features_pkey'

Hi @ABDO,

One of the important upgrade scripts (dbscripts/xml/upgrade/1.1.0.0_preupdate.xml) is being skipped when it appears that it shouldn’t be. Are you sure your database is a clean OMP 1.0 beta database, i.e. that it hasn’t been partially upgraded before? In OMP 1.0b there should be a press_id column in the plugin_settings table, but it appears that in your installation that’s not the case.

Regards,
Alec Smecher
Public Knowledge Project Team

I will check with our DBA and to be sure i will restore de DB.