Help with a migration

Cannot reproduce this locally with the exact same prod database; it happens only on production server. This error started with v2.8.2 and it is still present when I just barely upgraded to 2.8.4.

journalctl logs below

TRIED: I tried running the last / latest migration manually (including appending it with the VERSION=201905111...) but that didn’t work either.

What is the name of the column supposed to be: accounts.suspended_at? or accounts.suspended?

I had to restore an old DB so all I can figure is that this column got renamed somewhere and one of the migrations didn’t catch it?

Controller=AboutController action=show status=500 error='ActionView::Template::Error: PG::UndefinedColumn: ERROR:  column accounts.suspended does not exist
May 24 15:16:17 ecohost bundle[3714]: LINE 1: ...count_stats"."account_id" = "accounts"."id" WHERE "accounts"...
May 24 15:16:17 ecohost bundle[3714]:                                                              ^
May 24 15:16:17 ecohost bundle[3714]: HINT:  Perhaps you meant to reference the column "accounts.suspended_at".
May 24 15:16:17 ecohost bundle[3714]: : SELECT  "accounts".* FROM "accounts" INNER JOIN "account_stats" ON "account_stats"."account_id" = "accounts"."id" WHERE "accounts"."suspended" = $1 AND "accounts"."moved_to_account_id" IS NULL AND "accounts"."silenced" = $2 AND "accounts"."discoverable" = $3 AND "account_stats"."followers_count" >= 10 ORDER BY account_stats.followers_count desc LIMIT $4' duration=19.87 view=0.00 db=1.34```

You can delete this now. I ended up dropping the PostgresDB and restoring it since nothing else worked and I spent all day trying to debug it. :cry:

20190511134027_add_silenced_at_suspended_at_to_accounts.rb was only added recently into master and isn’t in the stable or 2.8.4 branch yet. It’s best to stick with the release branches unless you want to run into issues like this.

Saying that, I’m running a fork tracking master and after deploying the recent changes to the domain blocks (https://github.com/tootsuite/mastodon/pull/10660) I had to run tootctl cache clear to avoid the column accounts.suspended does not exist error.

1 Like