# Migration error on fresh startup running in k8s cluster

**URL:** https://meta.discourse.org/t/migration-error-on-fresh-startup-running-in-k8s-cluster/184751
**Category:** Self-hosting
**Tags:** unsupported-install
**Created:** [March 29, 2021, 1:40pm UTC](https://meta.discourse.org/t/migration-error-on-fresh-startup-running-in-k8s-cluster/184751 "2021-03-29T13:40:06Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![mobiusdickus](https://avatars.discourse-cdn.com/v4/letter/m/bcef8e/32.png) [@mobiusdickus](https://meta.discourse.org/u/mobiusdickus)
#### Post date: [March 29, 2021, 1:40pm UTC](https://meta.discourse.org/t/migration-error-on-fresh-startup-running-in-k8s-cluster/184751/1 "2021-03-29T13:40:06Z")

</div>

Hi!

I am running the latest version of discourse on a k8s cluster and upon startup and I keep getting this error:

```plaintext
    ERROR: relation "translation_overrides" does not exist at character 454
STATEMENT: SELECT a.attname, format_type(a.atttypid, a.atttypmod),
 	       pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod,
 	       c.collname, col_description(a.attrelid, a.attnum) AS comment
 	  FROM pg_attribute a
 	  LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum
 	  LEFT JOIN pg_type t ON a.atttypid = t.oid
 	  LEFT JOIN pg_collation c ON a.attcollation = c.oid AND a.attcollation <> t.typcollation
 	 WHERE a.attrelid = '"translation_overrides"'::regclass
 	   AND a.attnum > 0 AND NOT a.attisdropped
 	 ORDER BY a.attnum

```

I am guessing it has something to do with the initial setup and db migration, but I am wondering if anyone here might know why exactly this keeps happening.

Local setup is run with minikube and error logs are pulled from pgsql pod.  
Discourse image used → bitnami/discourse:latest ([https://github.com/bitnami/bitnami-docker-discourse](https://github.com/bitnami/bitnami-docker-discourse))  
Postgres image → postgres:11.9

Thank you and cheers!

---

<div class="post-metadata">

### Author: ![lucasbasquerotto](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lucasbasquerotto/32/133376_2.png) [@lucasbasquerotto](https://meta.discourse.org/u/lucasbasquerotto)
#### Post date: [March 29, 2021, 1:50pm UTC](https://meta.discourse.org/t/migration-error-on-fresh-startup-running-in-k8s-cluster/184751/2 "2021-03-29T13:50:07Z")

</div>

> [@mobiusdickus](#):
>
> Discourse image used → bitnami/discourse:latest

In this case, I think you should ask it for them, you probably won’t find a solution here, given that you are using an unsupported install.

The place to create an issue is probably:

[https://github.com/bitnami/bitnami-docker-discourse/issues](https://github.com/bitnami/bitnami-docker-discourse/issues)

Or you can change your install to an [official install](https://meta.discourse.org/t/142537?silent=true) (although I don’t know if you can run the [official install](https://meta.discourse.org/t/142537?silent=true) in a k8s cluster).

---

<div class="post-metadata">

### Author: ![mobiusdickus](https://avatars.discourse-cdn.com/v4/letter/m/bcef8e/32.png) [@mobiusdickus](https://meta.discourse.org/u/mobiusdickus)
#### Post date: [March 29, 2021, 2:23pm UTC](https://meta.discourse.org/t/migration-error-on-fresh-startup-running-in-k8s-cluster/184751/3 "2021-03-29T14:23:18Z")

</div>

Thank you for the help, much appreciated 🙂

---

<div class="post-metadata">

### Author: ![marcosbc](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/marcosbc/32/222119_2.png) [@marcosbc](https://meta.discourse.org/u/marcosbc)
#### Post date: [May 27, 2021, 10:59am UTC](https://meta.discourse.org/t/migration-error-on-fresh-startup-running-in-k8s-cluster/184751/4 "2021-05-27T10:59:44Z")

</div>

Hi all, we have been investigating this issue in Bitnami setups and we traced it back to the Discourse source code, as we could also reproduce it in the vanilla Discourse launcher using the official [standalone.yml template](https://raw.githubusercontent.com/discourse/discourse_docker/master/samples/standalone.yml):

```plaintext
$ ./launcher rebuild app
...
I, [2021-05-27T10:53:27.612150 #1] INFO -- : > cd /var/www/discourse && su discourse -c 'bundle exec rake plugin:pull_compatible_all'
I, [2021-05-27T10:53:30.072954 #1] INFO -- : docker_manager is already at latest compatible version

I, [2021-05-27T10:53:30.073194 #1] INFO -- : > cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate'

2021-05-27 10:53:32.977 UTC [4354] discourse@discourse ERROR: relation "translation_overrides" does not exist at character 454
2021-05-27 10:53:32.977 UTC [4354] discourse@discourse STATEMENT: SELECT a.attname, format_type(a.atttypid, a.atttypmod),
	       pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod,
	       c.collname, col_description(a.attrelid, a.attnum) AS comment
	  FROM pg_attribute a
	  LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum
	  LEFT JOIN pg_type t ON a.atttypid = t.oid
	  LEFT JOIN pg_collation c ON a.attcollation = c.oid AND a.attcollation <> t.typcollation
	 WHERE a.attrelid = '"translation_overrides"'::regclass
	   AND a.attnum > 0 AND NOT a.attisdropped
	 ORDER BY a.attnum

Warning: no type cast defined for type "name" with oid 19. Please cast this type explicitly to TEXT to be safe for future changes.
> Seeding theme and color schemes
I, [2021-05-27T10:53:49.976589 #1] INFO -- : == 20000225050318 AddSchemaMigrationDetails: migrating ========================
...

```

---

<div class="post-metadata">

### Author: ![Ed\_S](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ed_s/32/134015_2.png) [@Ed\_S](https://meta.discourse.org/u/Ed_S)
#### Post date: [February 24, 2025, 5:57pm UTC](https://meta.discourse.org/t/migration-error-on-fresh-startup-running-in-k8s-cluster/184751/5 "2025-02-24T17:57:10Z")

</div>

Just to note, I got this today on a fresh (ARM) install, as a [standard install](https://meta.discourse.org/t/142537?silent=true), but although it says it’s an ERROR it doesn’t seem to have stopped the installation.

```plaintext
I, [2025-02-24T17:48:39.792821 #1] INFO -- : > cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate'
2025-02-24 17:48:43.887 UTC [389] discourse@discourse ERROR: relation "translation_overrides" does not exist at character 523
2025-02-24 17:48:43.887 UTC [389] discourse@discourse STATEMENT: SELECT a.attname, format_type(a.atttypid, a.atttypmod),
	       pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod,
	       c.collname, col_description(a.attrelid, a.attnum) AS comment,
	       attidentity AS identity,
	       attgenerated as attgenerated
	  FROM pg_attribute a
	  LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum
	  LEFT JOIN pg_type t ON a.atttypid = t.oid
	  LEFT JOIN pg_collation c ON a.attcollation = c.oid AND a.attcollation <> t.typcollation
	 WHERE a.attrelid = '"translation_overrides"'::regclass
	   AND a.attnum > 0 AND NOT a.attisdropped
	 ORDER BY a.attnum
	
> Seeding theme and color schemes
I, [2025-02-24T17:49:11.765841 #1] INFO -- : == 20000225050318 AddSchemaMigrationDetails: migrating ========================

```

---

<div class="post-metadata">

### Author: ![purist33](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/purist33/32/497720_2.png) [@purist33](https://meta.discourse.org/u/purist33)
#### Post date: [April 14, 2025, 8:02pm UTC](https://meta.discourse.org/t/migration-error-on-fresh-startup-running-in-k8s-cluster/184751/6 "2025-04-14T20:02:09Z")

</div>

I dont know if it makes any sense. But I got a similar error when I was setting up discourse in k8s using the bitnami chart, and it went away for me when I made the postgres password longer. It might be a coincidence though.
