Tough Mastodon #GlitchSoc upgrade to v4.6.0 this morning... The pre-deployment migration step got stuck here:
StandardError: An error has occurred, this and all later migrations canceled: (StandardError)
PG::DuplicateColumn: ERROR: column "avatar_description" of relation "accounts" already exists
/opt/mastodon/db/migrate/20260127141459_add_avatar_description_to_accounts.rb:5:in 'AddAvatarDescriptionToAccounts#change'
(later followed by the same error on AddHeaderDescriptionToAccounts)
As any "good" sysadmin does, I blindly followed the LLMs instructions. It worked, I think?
After running docker exec -it mastodondb psql -U postgres -d mastodon -c \
"INSERT INTO schema_migrations (version) VALUES ('20260127141459');"
INSERT 0 1 and docker exec -it mastodondb psql -U postgres -d mastodon -c \
"INSERT INTO schema_migrations (version) VALUES ('20260127141820');"
INSERT 0 1, I was successfully able to do the prescribed migrations for upgrade...
I feel gross.