# PG::UndefinedTable: ERROR: relation "voice\_rooms" does not exist

**URL:** https://meta.discourse.org/t/pg-error-relation-voice-rooms-does-not-exist/411555
**Category:** Self-hosting
**Created:** [September 3, 2026, 9:03am UTC](https://meta.discourse.org/t/pg-error-relation-voice-rooms-does-not-exist/411555 "2026-09-03T09:03:31Z")
**Posts on this page:** 1
**Showing post:** 10

<div class="post-metadata">

### Author: ![nathank](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nathank/32/290039_2.png) [@nathank](https://meta.discourse.org/u/nathank)
#### Post date: [September 10, 2026, 6:18am UTC](https://meta.discourse.org/t/pg-error-relation-voice-rooms-does-not-exist/411555/10 "2026-09-10T06:18:17Z")

</div>

I had this problem too - and running that script required a bit of coaching from [ask.discourse.com](http://ask.discourse.com) as it isn’t super easy for less expert sysadmins!

Here is a summary for others:

* * *

For anyone hitting this on the standard docker install, here’s how to actually run the script above.

**Get a shell and open `psql`.**

- **Single container:**

- **Two-container setup:**

You should see a `discourse=#` prompt. If unsure, run `\conninfo`.

**Run the script.**

Paste the whole `DO $$ ... $$;` [block from nat’s post above](https://meta.discourse.org/t/pg-error-relation-voice-rooms-does-not-exist/411555/8) at the prompt and press Enter. A successful run prints notices like:

```plaintext
NOTICE: Renamed resenha_rooms to voice_rooms
NOTICE: Renamed resenha_room_memberships to voice_room_memberships
...

```

If instead it raises an exception (e.g. _“Both Resenha and Voice tables exist. Nothing was changed.”_), stop and paste the message back here — the script is deliberately safe and changes nothing in that case.

**Exit and rebuild.**

```plaintext
\q
exit

```

then back on the host:

```plaintext
./launcher rebuild app # single container
./launcher rebuild web_only # two-container (can also do via bootstrap of course)

```

You may need two rebuilds — the first finishes the half-applied migration state, the second completes cleanly.

---

_[View the full topic](https://meta.discourse.org/t/pg-error-relation-voice-rooms-does-not-exist/411555)._
