GitLab CE omnibus bricked after upgrade (PG::DependentObjectsStillExist)

I have ran into the same issues as these people:

https://forum.gitlab.com/t/upgrade-failed-17-1-2-17-2-0-at-database-migrations-in-docker/107898

https://forum.gitlab.com/t/gl-ee-upgrade-failed-cant-perform-ctl-reconfigure/107894

My setup: Debian Bookworm, upgraded gitlab-ce (omnibus) using aptitude.

After upgrade to 17.2.0, the system is bricked as it cannot be configured.

Error message:

PG::DependentObjectsStillExist: ERROR:  cannot drop desired object(s) because other objects depend on them
      DETAIL:  default value for column id of table merge_request_assignees depends on sequence merge_request_assignees_id_seq
      HINT:  Use DROP ... CASCADE to drop the dependent objects too.

If it helps, here is the output of gitlab-rake db:migrate:status:

...
  up     20240703104831  post     17.3         AddFkFromPCiBuildTagsToTags
  down    20240709014310  post     17.3         CleanupBigintConversionsForPCiBuildsAttempt2
  down    20240709060152  post     17.3         FinalizeBackfillFindingInitialPipelineId
  down    20240711092719  post     17.3         EnsureUniqueIdForPCiJobAnnotation

What can I do?

Assignee Loading
Time tracking Loading