Multisite upgrade failed due to missing database columns

I’m glad I found this topic. Had the same problem. But even now I have an error:

INFO -- : Running `bundle install --deployment --verbose --without "development"` with bundler 1.13.7
The --deployment flag requires a Gemfile.lock. Please make sure you have checked
your Gemfile.lock into version control before deploying.

So it seems it’s missing that Gemfile.lock file.

In the end I fixed it by running the older version of Discourse I had, then:

  • enter it with launcher enter app
  • cd db/migrations
  • paste the contents of the migration file above into a new file
  • cd /var/www/discourse && sudo -E -u discourse bundle exec rake multisite:migrate

Now you can upgrade as usual with launcher rebuild app.

4 « J'aime »