I’m stuck trying to upgrade a docker Discourse instance. I get the following error when I attempt to rebuild, bootstrap or in any other way setup the container:
I, [2020-11-18T15:23:37.357104 #1] INFO -- : > cd /var/www/discourse && su discourse -c 'bundle exec rake plugin:pull_compatible_all'
I, [2020-11-18T15:23:40.298932 #1] INFO -- : discourse-slack-official is already at latest compatible version
docker_manager is already at latest compatible version
I, [2020-11-18T15:23:40.299193 #1] INFO -- : > cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate'
rake aborted!
StandardError: An error has occurred, all later migrations canceled:
PG::SyntaxError: ERROR: syntax error at or near "NOT"
LINE 2: ADD COLUMN IF NOT EXISTS image_upload_id bigint
^
Additional note: the pg12 branch also doesn’t work (even though it does seem to try and download a different container version), still getting the same error on db:migrate…
How old is your discourse_docker checkout? I know the launcher script is meant to update itself automatically, but iIt might be worth running git pull by hand just to be sure.
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
discourse/base 2.0.20201004-2310 b64c37d7ab06 6 weeks ago 2.4GB
local_discourse/data latest 253fd4d68068 3 years ago 1.7GB
I’ve been sure to clear up old docker images and have attempted a rebuild of the web app multiple times.
Ahhh, do I need to rebuild the data container first or something? Haven’t touched it yet