problems with upgrading old installation
Hi,
as it was mentioned in a similar topic, upgrading an older loomio installation which wasn't touch since installation can be tricky. I've tried for hours all the variations I could find, but wasn't successful yet. I'm running a Ubuntu 18.4 virtual server. I've tried several from the command mentioned in the other threads, upgrading the os, git pull etc. but nothing got me through.
What could be the most useful next step?
Thanks,
Holger (Berlin Burner e.V.)
Robert Guthrie Fri 3 Jul 2020 4:58AM
Hi @Holger Wessels. Sorry I've not had any time to look into this until now.
The key part of the log is: The single-table inheritance mechanism failed to locate the subclass: 'FormalGroup'.
The easiest way to fix this might be to bring the classes back, empty.
I've just commited this solution to the master branch, and a new latest image will be built in the next hour, and you should be able to switch from stable
to the latest
docker image in docker-compose.yml and hopefully that will help you through.
I would be bracing myself for maybe one or two more problems like this given the age of your database.. but who knows, maybe this will be the only issue 馃
Holger Wessels Fri 3 Jul 2020 11:31AM
Well, I'm getting further, but not until the end yet. :-) With the latest docker image I'm the migration stops with a different type of error, this time a missing function of which I don't know how important it is:
Migrating to UpdateStanceDataForMeetingPolls (20190827234738)
== 20190827234738 UpdateStanceDataForMeetingPolls: migrating ==================
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:
undefined local variable or method `hideresultsuntil_closed' for #<Poll:0x000056238e27a1e8>
Holger Wessels Fri 3 Jul 2020 1:40PM
Could it be a better strategy to try to update in smaller steps to versions in between (like in 3 month steps), if that is possible?
Holger Wessels Fri 3 Jul 2020 2:51PM
Well, to answer that to myself: it appears that the versions between March 2019 and v2.1.10 are not on docker hub, so not so much luck to pretend I did frequent updates 馃檪
Holger Wessels Tue 14 Jul 2020 10:11AM
Hi @Rob Guthrie , any leads on hide_results_until_closed?
Robert Guthrie Tue 14 Jul 2020 9:56PM
yea, it's taken us too long to move to proper versioning, which would have really helped in cases like this. Oh well, it's here now.
Robert Guthrie Tue 14 Jul 2020 10:01PM
I'm pushing a fix to master (docker:latest) now. Should be up soon. Thanks for finding these migration issues for us.
Holger Wessels Wed 15 Jul 2020 9:53AM
Well, slowly moving forward. But here's another one:
Migrating to UpdateStanceDataForMeetingPolls (20190827234738)
== 20190827234738 UpdateStanceDataForMeetingPolls: migrating ==================
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:
PG::UndefinedColumn: ERROR: column stances.revoked_at does not exist
LINE 1: ...s"."poll_id" = $1 AND "stances"."latest" = $2 AND "stances"....
^
: SELECT "stances".* FROM "stances" WHERE "stances"."pollid" = $1 AND "stances"."latest" = $2 AND "stances"."revokedat" IS NULL ORDER BY "stances"."created_at" ASC LIMIT $3
Robert Guthrie Wed 15 Jul 2020 9:59AM
Whoops, posted early.
You can just comment out line 3 in db/migrate/20190827234738_update_stance_data_for_meeting_polls.rb
and run the migrations.
I'm not sure how to fix this/make it go away for for others yet. Scheduling it as a background job when the app boots would do.
But.. maybe I'll see if someone else wants to do that for me.
Holger Wessels 路 Tue 30 Jun 2020 10:40PM
So to start with the very basic beginning:
(I wasn't able to paste the whole stack, led to internal 400 and 422 HTTP errors on the Javascript console, but no message visible to the user)