[gitlab-shell] NoMethodError 'authorized_keys_enabled' during "rake gitlabšŸšsetup"

I have run gitlab directly on my Arch Linux host for some years now and during yesterdays upgrade to gitlab 11.4.3 with gitlab-shell 8.4.1 I encountered an error during update and creation of the authorized_keys file.

When adding an ssh key in the web interface, gitlab-sidekiq logs this error: https://gist.github.com/Araeos/38732ec77e52d20e3ec271118f618688
And when trying to regenerate the authorized_keys files using the rake task ā€œgitlab:shell:setupā€ I encountered this similar error: https://gist.github.com/Araeos/29f8fce74d3b8f5fcfafedf16fcc2d73
Needless to say, I cannot authenticate using ssh.

Both errors say something along the lines of ā€œundefined method `authorized_keys_enabledā€™ for ApplicationSetting instanceā€.
I presume there is a missing configuration entry or maybe there really is a method missing as I have practically zero experience with ruby and gitlabā€™s source code.

Any help is appreciated.

Short update for any interested reader: I have finally fixed this issue.
Although it wasnā€™t obvious to me at all from the error message, the ā€˜authorized_keys_enabledā€™ error indicates a missing column in the database backend. I verified that my postgresql database has indeed no column by that name in the application_settings table and checked if the corresponding migration was run.
Curiously, the migration in question (version 20170531180233) has supposedly been run but by removing it from the database, rerunning migrations and then setting the value to true, I could now regenerate the authorized_keys file.

Although I worry about the health of my database, this problem is fixed :slight_smile:.
Slight aside: The source of the problem may have been the manual transition from mariadb to postgresql.