DB Migration fails on latest update

Phew, managed to fix this.

In my case the tables don’t appear to be owned by the same user, as I’ve not looked at the DB before I’ve no idea if this has always been the case or not (I inherited this system).

As the failing script appeared to be ALTERing the audit_events table, which happened to be owned by a user other than the user Gitlab connects as, I changed the owner of the table to the gitlab user.

Re-ran the gitlab-ctl reconfigure which failed again with the same error, so I also change the owner of the sequence audit_events_id_seq to the Gitlab user.

Re-ran gitlab-ctl reconfigure and this time the process completed OK and the healthcheck now passes.

1 Like