OJS database Upgrade failure to 3.4.0

I’m migrating my OJS instance to a new server:
Old: CentOS Linux release 7.9.2009 / PHP 7.4.33 / PostgreSQL 9.6.24
New: Ubuntu 22.04.3 LTS / PHP 8.1.2 / PostgreSQL 15.5

ERROR: Upgrade failed: DB: SQLSTATE[23502]: Not null violation: 7 ERROR: column “publication_id” of relation “authors” contains null values (SQL: ALTER TABLE authors ALTER publication_id SET NOT NULL)