ich habe versucht, das Discourse-Forum auf der Testinstanz auf die neueste Version 2.2.0.beta5 zu aktualisieren, aber dies ist fehlgeschlagen.
Der Fehler lautet:
I, INFO -- : > cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate'
rake aborted!
StandardError: Ein Fehler ist aufgetreten, diese und alle folgenden Migrationen wurden abgebrochen:
PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "index_polls_on_post_id_and_name"
DETAIL: Key (post_id, name)=(662593, poll) already exists.
Ich habe mich in die PostgreSQL-Datenbank eingeloggt und geprüft, dass sich keine Werte in der Tabelle polls befinden. Es ist daher seltsam, warum wir den Fehler erhalten – „Key (post_id, name)=(662593, poll) already exists.":
=> SELECT * FROM polls;
id | post_id | name | close_at | type | status | results | visibility | min | max | step | anonymous_voters | created_at | updated_at
----±--------±-----±---------±-----±-------±--------±-----------±----±----±-----±-----------------±-----------±-----------
(0 rows)
Can someone from development team take a look to this question ?
We are blocked with update of Discourse forum to the latest version, because of this error.
And also we cannot install additional plugin, as docker container is not compiled and as a result is not running.
It turns out that the problem was that the poll had been duplicated in a quote block, and the migration didn’t know to ignore it. It was in a PM, apparently as an example of how polls worked. I deleted the duplicate and the migration ran fine.