Upgrade failure (Postgresql)

Hi @Steve_Michaels,

I’ve identified and fixed a few issues that hopefully will get your upgrade going. Can you try applying the patches listed in the issue above? Please report your success back on the issue.

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like

Hi @asmecher

Same problem here.
Can you confirm what commits must I apply?

asmecher commented on Sep 2
Patches to apply:
In lib/pkp: 7e33ad6
In root: pkp/ojs@69ed23a
In root: pkp/ojs@625a736
To correct ERROR: type "serial" does not exist: Download patch from https://pkp.sfu.ca/support/forum/viewtopic.php?t=11896#p45922

Just this or some new step?

I applied just those patches (all of them) and the upgrade went fine.

STEVE Michaels

Emerging Technologies Librarian

ph 616.392.8555 x187

101 East 13th Street, Holland MI 49423-3622

[image: WTS_logo_email.png]

Now I got another error:
[pre-install]
[load: upgrade.xml]
[version: 3.0.0.0]

[code: Installer Installer::syncSeriesAssocType]
[data: dbscripts/xml/upgrade/2.4.0_preupdate_usageStatistics.xml (skipped)]
[data: dbscripts/xml/upgrade/2.4.0_preupdate_usageStatistics2.xml]
[data: dbscripts/xml/upgrade/3.0.0_preupdate.xml]
[data: dbscripts/xml/upgrade/3.0.0_adaptTimedViews.xml (skipped)]
[data: dbscripts/xml/upgrade/3.0.0_adaptReferrals.xml]
[data: dbscripts/xml/upgrade/3.0.0_adaptBooksForReview.xml]
[schema: lib/pkp/xml/schema/common.xml]
[schema: lib/pkp/xml/schema/log.xml]
[schema: lib/pkp/xml/schema/announcements.xml]
[schema: lib/pkp/xml/schema/scheduledTasks.xml]
[schema: lib/pkp/xml/schema/temporaryFiles.xml]
[schema: lib/pkp/xml/schema/metadata.xml]
[schema: lib/pkp/xml/schema/reviews.xml]
[schema: lib/pkp/xml/schema/reviewForms.xml]
[schema: lib/pkp/xml/schema/controlledVocab.xml]
[schema: lib/pkp/xml/schema/submissions.xml]
[schema: lib/pkp/xml/schema/submissionFiles.xml]
[schema: lib/pkp/xml/schema/notes.xml]
[schema: lib/pkp/xml/schema/views.xml]
[schema: lib/pkp/xml/schema/genres.xml]
[schema: lib/pkp/xml/schema/gifts.xml]
[schema: lib/pkp/xml/schema/mutex.xml]
[schema: lib/pkp/xml/schema/tombstone.xml]
[schema: lib/pkp/xml/schema/rolesAndUserGroups.xml]
[schema: lib/pkp/xml/schema/metrics.xml]
ERROR: Upgrade failed: DB: ERROR: smallint out of range

Datatype maybe?

Hi @Tarcisio_Pereira,

See this post.

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like

Hi @asmecher

The previous error was solved. But now I’m getting:

[data: dbscripts/xml/upgrade/3.0.0_update.xml]
ERROR: Upgrade failed: DB: ERROR:  duplicate key value violates unique constraint "review_rounds_submission_id_stage_id_round_pkey"
DETALHE:  Key (submission_id, stage_id, round)=(98792, 3, 1) already exists.

Postgres log:

ERROR:  duplicate key value violates unique constraint "review_rounds_submission_id_stage_id_round_pkey"
DETAIL:  Key (submission_id, stage_id, round)=(98792, 3, 1) already exists.
STATEMENT:  UPDATE review_rounds SET stage_id=3

OJS 2.4.8.0 database:

revistas=> select * from review_rounds where submission_id = 98792;
 review_round_id | submission_id | stage_id | round | review_revision | status 
-----------------+---------------+----------+-------+-----------------+--------
            5718 |         98792 |          |     1 |               1 |       
            5719 |         98792 |          |     1 |               1 |       
            5889 |         98792 |          |     1 |               1 |       
            5894 |         98792 |          |     1 |               1 |       
            6918 |         98792 |          |     1 |               1 |       
            7588 |         98792 |          |     1 |               1 |       
            7589 |         98792 |          |     1 |               1 |       
(7 rows)

Bizarre…

Regards,
Tarcisio Pereira.

Hi @Tarcisio_Pereira,

Can you post your new question as a new topic? That’ll help keep the forum organized.

Thanks,
Alec Smecher
Public Knowledge Project Team

1 Like

Hi @asmecher

Sorry by that.
I’m opening a new topic right now!

Best regards.
Tarcisio Pereira

This error has returned with OJS 3.0.2, upgrading from 3.0.0. I haven’t yet figured out where it’s coming from…

Hi @crism,

Which error message? There are several quoted here.

Regards,
Alec Smecher
Public Knowledge Project Team

Sorry—the one in the initial message, type "serial" does not exist. I’ve found the ADODB patch, but this has been a known bug for 3 years, and the known fix should really be incorporated into the codebase, IMO.

Erg, but the patch no longer works. It tries to modify the definition of _GenFields(), but the location of the function has moved…

UPDATE: I misread the error message from patch. It’s the same EOL error another user reported. The patch still works; sorry.

Though, of course, my database is now in a half-upgraded state… d-:

Hi @crism,

Glad to hear the patch is applying. You’ll need to restore from backup before continuing – trying to work with a half-upgraded database is painful and error-prone. I’m hoping that this patch won’t be required once I’ve done some underlying work on the tools we’re using – I did a little exploratory work on this just last week: Test migration of ADODB to Composer dependency · Issue #2353 · pkp/pkp-lib · GitHub

Regards,
Alec Smecher
Public Knowledge Project Team

The new work is promising. I hope we can get to use it soon. (-:

Hello.
I using:
debian 8
PHP 5.4.16
Apache 2.4.6
psql (PostgreSQL) 9.4.11

I donwload OJS3 : http://pkp.sfu.ca/ojs/download/ojs-3.0.2.tar.gz
but when I update database →
Error: The only error being logged is “ERROR: type “serial” does not exist”

The patch is??:Error on OMP 1.1 Database Upgrade - PKP Support??
Test migration of ADODB to Composer dependency · Issue #2353 · pkp/pkp-lib · GitHub

Where I download a version that does not have this error (with postgres database) to install?

Hi @cristianviza,

You’ll have to apply the patch at the link above to resolve that issue. (It’s a patch to third-party code, which we don’t maintain.)

Regards,
Alec Smecher
Public Knowledge Project Team

The latest version of github has solved this problem with postgres migrate?

Regards

Hi @cristianviza,

No, you’ll have to apply the patch at the link above to resolve that issue.

Regards,
Alec Smecher
Public Knowledge Project Team

Hello Everybody.

How’s everybody?
I have a question. If in the new version 3.1 the problem was solved in postgres migration-> “ERROR: type” serial “does not exist”?

Regards
Cristian

Hi @cristianviza,

No, you’ll have to apply the patch at the link above to resolve that issue.

Regards,
Alec Smecher
Public Knowledge Project Team