# Multisite upgrade failed due to missing database columns

**URL:** <https://meta.discourse.org/t/multisite-upgrade-failed-due-to-missing-database-columns/54239>\
**Category:** Bug\
**Created:** [14 ديسمبر 2016، 2:41م UTC](https://meta.discourse.org/t/multisite-upgrade-failed-due-to-missing-database-columns/54239 "2016-12-14T14:41:35Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![Sander78](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sander78/32/296615_2.png) [@Sander78](https://meta.discourse.org/u/Sander78)\
**Post date:** [10 يناير 2017، 3:28م UTC](https://meta.discourse.org/t/multisite-upgrade-failed-due-to-missing-database-columns/54239/11 "2017-01-10T15:28:12Z")

</div>

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

```plaintext
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`.

---

_[View the full topic](https://meta.discourse.org/t/multisite-upgrade-failed-due-to-missing-database-columns/54239)._
