OJS 3.0.2: Can't add galley

We upgraded another installation from 2.4.8 to 3.1.0 and I had to do the same fix for that one also, so the problem remains for postgres. The only significant difference in our fork from upstream is the postgres-patch to adodb in pkp-lib discussed elsewhere.

This command solves the issue:

ALTER TABLE submission_galleys ALTER COLUMN file_id DROP NOT NULL;

It would be nice if the error was returned to the frontend, at the moment there is just a spinner that never finishes.