500 Internal Server Error After Update

I have been using Vaultwarden version 1.27.0 for a while now through Docker on Unraid and SQL. The reason being, every time I attempt to upgrade to anything greater, I lose all ability to log in until I downgrade back to 1.27.0.

I have done some extensive troubleshooting with no luck so hopefully someone here can steer me in the right direction.

I’ll be using version 1.28.0 for my explanation although I have tried more recent releases.

After upgrading to 1.28.0, If i attempt to log into my account through any and all means (Web, Windows Client, Mac Client, Android Client, etc) I just receive the standard

An error has occurred.Username or password is incorrect. Try again

At this point I still have access to the /admin web page. Everything in the admin section loads EXCEPT the users tab. I then receive a “500: Internal Server Error” page.

I then enabled deeper logs to analyse. When trying to access the Users tab in the admin section, the logs show me errors such as

[panic][ERROR] thread 'rocket-worker-thread' panicked at 'Error loading users: DatabaseError(Unknown, "Unknown column 'users.client_kdf_memory' in 'field list'")': src/db/models/user.rs:381
[rocket::server::_][ERROR] Handler login panicked.
[rocket::server::_][WARN] A panic is treated as an internal server error.
[rocket::server::_][WARN] No 500 catcher registered. Using Rocket default.
[response][INFO] (login) POST /identity/connect/token => 500 Internal Server Error

I originally though the database might be corrupt but all scans and checks come back clean. Downgrading back to 1.27.0 “fixes” all the problems.

This led me to believe the database migration process failed. I was unable to find any concrete way of forcing a database migration so I backed up my database, deleted the most recent migration record, and proceeded to upgrade back to 1.28.0… No luck

I have disabled all 2FA, SMTP, etc. Nothing seems to work and I would really like to update my Vaultwarden version to something newer to maintain compatibility with the Bitwarden clients.

Any suggestions?

Update: I managed to get everything all working. I had to complete the database migration manually. Turns out the db migration process skipped many things since 2022.

Probably the charset and/or collation are incorrect, which causes Foreign Keys to break, and thus also the migration.
Also, if a migration falls Vaultwarden will stop loading. Thus something most have forced it to continue.