Ich habe gerade eine Fehlermeldung bei meiner Discourse-Installation erhalten, als ich versucht habe, auf 3.5.0.beta3-dev zu aktualisieren:
Discourse kann nicht gestartet werden. Vorschläge sind sehr willkommen.
Status: Image ist aktuell für discourse/base:2.0.20250226-0128
...
I, [2025-04-18T15:16:34.677745 #1] INFO -- : cd /var/www/discourse & su discourse -c 'LOAD_PLUGINS=0 bundle exec rake plugin:pull_compatible_all'
I, [2025-04-18T15:16:40.775977 #1] INFO -- : discourse-bbcode-color ist bereits in der neuesten kompatiblen Version
discourse-cakeday ist bereits in der neuesten kompatiblen Version
discourse-chat-integration ist bereits in der neuesten kompatiblen Version
discourse-data-explorer ist bereits in der neuesten kompatiblen Version
discourse-math ist bereits in der neuesten kompatiblen Version
discourse-oauth2-basic ist bereits in der neuesten kompatiblen Version
discourse-rss-polling ist bereits in der neuesten kompatiblen Version
discourse-solved ist bereits in der neuesten kompatiblen Version
discourse-whos-online ist bereits in der neuesten kompatiblen Version
discourse-yearly-review ist bereits in der neuesten kompatiblen Version
docker_manager ist bereits in der neuesten kompatiblen Version
Fehler:
I, [2025-04-18T15:16:50.782650 #1] INFO -- : cd /var/www/discourse & su discourse -c 'bundle exec rake db:migrate'
2025-04-18 15:16:59.705 UTC [911] discourse@discourse ERROR: null value in column "answer_post_id" of relation "discourse_solved_solved_topics" violates not-null constraint
2025-04-18 15:16:59.705 UTC [911] discourse@discourse DETAIL: Failing row contains (768, 16673, null, -1, null, 2021-05-10 18:32:53.008822, 2021-05-10 18:32:53.008822).
2025-04-18 15:16:59.705 UTC [911] discourse@discourse STATEMENT: INSERT INTO discourse_solved_solved_topics (
topic_id,
answer_post_id,
topic_timer_id,
accepter_user_id,
created_at,
updated_at
)
SELECT
tc.topic_id,
tc.answer_post_id,
tc.topic_timer_id,
tc.accepter_user_id,
tc.created_at,
tc.updated_at
FROM (
SELECT
tc.topic_id,
CAST(tc.value AS INTEGER) AS answer_post_id,
CAST(tc2.value AS INTEGER) AS topic_timer_id,
COALESCE(ua.acting_user_id, -1) AS accepter_user_id,
tc.created_at,
tc.updated_at,
ROW_NUMBER() OVER (PARTITION BY tc.topic_id ORDER BY tc.created_at ASC) AS rn_topic,
ROW_NUMBER() OVER (PARTITION BY CAST(tc.value AS INTEGER) ORDER BY tc.created_at ASC) AS rn_answer
FROM topic_custom_fields tc
LEFT JOIN topic_custom_fields tc2 ON tc2.topic_id = tc.topic_id AND tc2.name = 'solved_auto_close_topic_timer_id'
LEFT JOIN user_actions ua ON ua.target_topic_id = tc.topic_id AND ua.action_type = 15
WHERE tc.name = 'accepted_answer_post_id'
AND tc.id > 0
AND tc.id <= 0 + 10000
) tc
WHERE tc.rn_topic = 1 AND tc.rn_answer = 1
ON CONFLICT DO NOTHING
rake aborted!
StandardError: An error has occurred, all later migrations canceled: (StandardError)