Hi, my Discourse instance failed to upgrade recently until I made a specific manual change to the database. I narrowed it down to this commit:
index_poll_options_on_poll_id_and_digest unique index which requires each option’s digest (generated from the option text) to be unique from option to option. In other words, if your poll is “what color is the sky” with options “blue” and “blue”, the insert will fail. (My database is imported from PHPBB3 which is why these things might be allowed to have existed before). If that index fails, it aborts the rails migration part of the container rebuild, leaving the site in a broken state.
Solutions I recommend:
plugins/poll/db/post_migrate/20180820080623_migrate_polls_data.rb file to merge duplicate options and their votes into one option.
Remove the requirement that options must be unique.