ERROR: column "publication_id" contains null values

I 'm upgrading OMP from version 3.1.2.4 to version 3.2.1.4 and got the following Error:

 [06-Dec-2022 22:19:44 UTC] PKP-Database-Logger 1670365181,5043:
(postgres8): CREATE TABLE publications (
publication_id           SERIAL,
date_published           DATE,
last_modified            TIMESTAMP,
locale                   VARCHAR(14),
primary_contact_id       INT8,
publication_date_type    VARCHAR(32) DEFAULT 'pub',
publication_type         VARCHAR(32) DEFAULT 'publication',
seq                      FLOAT8 DEFAULT 0 NOT NULL,
series_id                INT8,
series_position          VARCHAR(255),
submission_id            INT8 NOT NULL,
status                   SMALLINT DEFAULT 1 NOT NULL,
url_path                 VARCHAR(64),
version                  INT8,
                 PRIMARY KEY (publication_id)
)  


[06-Dec-2022 22:19:44 UTC] PKP-Database-Logger 1670365181,5043:
(postgres8): CREATE INDEX publications_submission_id ON publications (submission_id)  


[06-Dec-2022 22:19:44 UTC] PKP-Database-Logger 1670365181,5043:
(postgres8): CREATE INDEX publications_section_id ON publications (series_id)  


[06-Dec-2022 22:19:44 UTC] PKP-Database-Logger 1670365181,5043:
(postgres8): DROP INDEX publication_format_submission_id  


[06-Dec-2022 22:19:44 UTC] PKP-Database-Logger 1670365181,5043:
(postgres8): ALTER TABLE publication_formats ALTER COLUMN publication_format_id TYPE INT8   


[06-Dec-2022 22:19:44 UTC] PKP-Database-Logger 1670365181,5043:
(postgres8): ALTER TABLE publication_formats ALTER COLUMN publication_format_id SET NOT NULL  


[06-Dec-2022 22:19:44 UTC] PKP-Database-Logger 1670365181,5043:
(postgres8): ALTER TABLE publication_formats ADD COLUMN publication_id INT8   


[06-Dec-2022 22:19:44 UTC] PKP-Database-Logger 1670365181,5043:
(postgres8): ALTER TABLE publication_formats ALTER COLUMN publication_id SET NOT NULL  


[06-Dec-2022 22:19:44 UTC] PHP Warning:  pg_query(): Query failed: ERROR:  column "publication_id" contains null values in /var/www/html/omp-3.2.1-4/lib/pkp/lib/vendor/adodb/adodb-php/drivers/adodb-postgres7.inc.php on line 259
[06-Dec-2022 22:19:44 UTC] PKP-Database-Logger 1670365181,5043: -1: ERROR:  column "publication_id" contains null values
[06-Dec-2022 22:19:44 UTC] ERROR:  column "publication_id" contains null values

I executed the following SQL:

 SELECT c.citation_id FROM citations c LEFT JOIN submissions s ON (c.submission_id = s.submission_id) WHERE s.submission_id IS NULL;
 citation_id
-------------
(0 rows)

Do you have any idea?
Could you help me?

Thanks.-

Hi @miguelazzurri

Checking your SQL query:

Why are you checking citations table and the submissions_id from it? Maybe you could check the
publications table and the publication_id column.

Also, there is a thread where other individuals are discussing OJS upgrade using PGSQL as database. It might give a few more hints about your own issue here:

Best,
Israel