# 1.9.0.beta11からのアップグレードに問題

**URL:** <https://meta.discourse.org/t/trouble-upgrading-from-1-9-0-beta11/105219>\
**Category:** Self-hosting\
**Created:** [2018 年 12 月 28 日午後 8:53 UTC](https://meta.discourse.org/t/trouble-upgrading-from-1-9-0-beta11/105219 "2018-12-28T20:53:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [2018 年 12 月 28 日午後 8:53 UTC](https://meta.discourse.org/t/trouble-upgrading-from-1-9-0-beta11/105219/1 "2018-12-28T20:53:53Z")

</div>

I’m trying to upgrade from `Discourse 1.9.0.beta11` that needed a postgres upgrade. Postgres upgrade seemed OK, but now rebuild fails with:

```plaintext
Caused by:                                                                                                                              
PG::DependentObjectsStillExist: ERROR: cannot drop table users column email because other objects depend on it                         
DETAIL: trigger users_email_readonly on table users depends on table users column email                                                
HINT: Use DROP ... CASCADE to drop the dependent objects too.               

```

Predictably, I can’t restore that backup to an up-to-date Discourse.

I’m not quite sure how I’d make use of the hint to `DROP ... CASCADE`.

If someone else has the problem and manages to find this, moving the `postgres_data_old` back to `postgres_data` and restarting the old container got the site back up, but I’m not sure how to get things upgraded.

This is why not to wait 14 months between upgrades, people! 😉

---

<div class="post-metadata">

**Author:** ![michaeld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/michaeld/32/1594_2.png) [@michaeld](https://meta.discourse.org/u/michaeld)\
**Post date:** [2018 年 12 月 28 日午後 9:24 UTC](https://meta.discourse.org/t/trouble-upgrading-from-1-9-0-beta11/105219/2 "2018-12-28T21:24:32Z")

</div>

Here’s how to restore such a backup

[https://meta.discourse.org/t/backup-failing-to-restore-cannot-restore-into-different-schema/88431/17](https://meta.discourse.org/t/backup-failing-to-restore-cannot-restore-into-different-schema/88431/17)

In general, as there were quite some of these issues in the 1.9.x versions, it’s best to first go to the latest Discourse version and then upgrade Postgres. Latest still works fine on 9.5, there is no need to upgrade Postgres first.

Oh, since you got it up and running again: to avoid this just run db:seed\_fu before you backup or upgrade Postgres.

---

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [2018 年 12 月 29 日午前 2:18 UTC](https://meta.discourse.org/t/trouble-upgrading-from-1-9-0-beta11/105219/3 "2018-12-29T02:18:40Z")

</div>

Thanks, @michaeld! I don’t know why I didn’t search, but this is a great response.

> [@michaeld](#):
>
> In general, as there were quite some of these issues in the 1.9.x versions, it’s best to first go to the latest Discourse version and then upgrade Postgres. Latest still works fine on 9.5, there is no need to upgrade Postgres first.

Oh. That’s a good tip, though I’m not sure how to do that on a [standard install](https://meta.discourse.org/t/142537?silent=true).

I was going to suggest to just delete this topic since the linked post has the answer, but . . .

> [@michaeld](#):
>
> Oh, since you got it up and running again: to avoid this just run db:seed\_fu before you backup or upgrade Postgres.

Aha! That seems like the best tip of all, as a mere mortal can conceivably run `db:seed_fu` before an upgrade. Upgrading without having Postgres update first and poking around in a tar file to edit SQL, not so much. 🙂

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)\
**Post date:** [2019 年 1 月 28 日午前 2:27 UTC](https://meta.discourse.org/t/trouble-upgrading-from-1-9-0-beta11/105219/4 "2019-01-28T02:27:06Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
