Issues with migrating to 16.3.4

Hello out there,
im currently having a hard time migrating to 16.3.4 from a not to old gitlab version. At first i run into the issue described here: Batched Background migrations fail on upgrade to 15.11.0 (#408835) · Issues · / GitLab · GitLab
After applying this fix the missing entry was there but now complains that it already exists and cant continue with:
PG::DuplicateColumn: ERROR: column “id_convert_to_bigint” of relation “ci_build_needs” already exists
Any advice is well apreciated as i cannot get around this issue without getting the initial error.
Kind Regards Tobi

Hi Tobi,

We are also experiencing the same issue. We have tried the “fix” and get the “already exists” error.
PG::DuplicateColumn: ERROR: column “id_convert_to_bigint” of relation “ci_build_needs” already exists

Our DB is split as well and wonder if a migration to the wrong DB could cause this.

Hopefully someone will be able to enlighten us.


We were able to resolve this by dropping the “id_convert_to_bigint” column from ci_build_needs table and from the sent_notifications table. The reconfigure and subsequent upgrades were all successful.

upgrade order:
16.1.5 → 16.2.0 *reconfigure fails here and fix was applied then table exists problem occurred so dropped the 2 aforementioned columns and the reconfigure completes.
16.2.0–> 16.3.4 → 16.4.0.

good luck!

hello Waynus,
do you mind sharing the way you have done this? Tried exactly the same but it didnt work.
Kind Regards Tobias

Hi Tobias,

I ended up doing this since it was complaining they both existed.
ALTER TABLE ci_build_needs DROP COLUMN id_convert_to_bigint;
ALTER TABLE sent_notifications DROP COLUMN id_convert_to_bigint;
gitlab-ctl reconfigure

Thanks will try it. Maybe i can contact you after that and report when it is successful or ran into an issue?
Kind Regard Tobi