In the latest release notes (3.2.0.beta1), I noticed the discourse-ai
plugin which I hadn’t seen before, so I attempted to add this plugin and upgrade my discourse instance at the same time.
As mentioned in the title, I’m currently seeing an error in the bootstrap where the rake db:migrate
is failing to creat a unique index on theme_field_id
. Here’s some details on how I go to that point though…
Initial Upgrade Attempt (patch-package error)
I’m running a split container install, so I:
-
Edited my web_only.yml to add the new
discourse-ai
plugineg. Added an extra line to the plugins hooks
## Plugins go here ## see https://meta.discourse.org/t/19157 for details hooks: after_code: - exec: cd: $home/plugins cmd: - sudo -E -u discourse git clone https://github.com/discourse/docker_manager.git - sudo -E -u discourse git clone https://github.com/discourse/discourse-voting.git - sudo -E -u discourse git clone https://github.com/discourse/discourse-ai.git
-
Ran
./launcher bootstrap web_only
It errored out with a message about patch-package
not being found.
Git Pull → boostrap (pg-vector error)
I figured I would make sure I had the latest launcher updates as it wouldn’t hurt before rertrying:
- Ran a
git pull
to make sure I had the latest launcher related updates - Ran
./launcher bootstrap web_only
again
This time I received error messages related pg-vector
.
I noted down my PostgreSQL versions so I’d have them for my records when I decided to revisit the discourse-ai
plugin.
- web_only:
- client:
psql (PostgreSQL) 13.10 (Debian 13.10-1.pgdg110+1)
- client:
- data:
- server:
PostgreSQL 13.9 (Debian 13.9-1.pgdg110+1)
- server:
Remove discourse-ai
Plugin → Bootstrap
And then I removed the discourse-ai
plugin the the web_only.yml
file and ran a bootstrap again.
Much to my surprise, I was still seeing errors, but this time they appear to be related to rake db:migrate
not being able to create a unique index index_javascript_caches_on_theme_field_id
with the detail: Key (theme_field_id)=(3) is duplicated.
Your help?
That brings me here looking for help. I figured I should take a pause and get some insights from the community before digging in further in case anyone else has seen this before.
For reference, I have 3.2.0.beta1-dev (993ed10cf0 ~ August 9th) installed.
And while I don’t think it’s related to this, I figure it doesn’t hurt to mention that I migrated between host machines at the start of this year… though I’ve done several Discourse updates through the admin UI since then.
Migration approach
From memory, this was basically upgrading the source instance to the latest Discourse version, Installing discourse on the new host, freezing the source, doing a Discourse backup on the source, rsync
images/etc between hosts, restore backup on new host.