שגיאה RecordNotUnique על אינדקס index_discourse_solved_solved_topics_on_answer_post_id

אני מקבל את השגיאה הבאה כשאני מנסה לעדכן באמצעות

./launcher rebuild app

ActiveRecord::RecordNotUnique: PG::UniqueViolation: שגיאה: לא ניתן ליצור אינדקס ייחודי "index_discourse_solved_solved_topics_on_answer_post_id" (ActiveRecord::RecordNotUnique)
פרטים: מפתח (answer_post_id)=(201795) מוקלט במחדש.

יש לך רעיונות איך לפתור את הבעיה הזאת?

Delete one of the SolvedTopic records via rails console:

DiscourseSolved::SolvedTopic.where(answer_post_id:201795).last.destroy
לייק 1

תודה. ניסיתי לגשת אליהם, אבל אני מקבלת

NameError: uninitialized constant SolvedTopic

יש רעיונות אחרים?

I’ve now connected to the database directly and deleted the record with the duplicate answer_post_id from discourse_solved_solved_topics.

All good now. Thanks again for your quick reply!

לייק 1

Hm. discourse-solved was updated recently.

There is a chance, that this error was thrown during database migration.

כן, זה קרה במהלך ההעברת מסד הנתונים.

Seems to be fixed with this patch:

4 לייקים

מצוין! תודה שהעברת את ההודעה — סימנתי את ההודעה שלך כפתרון.

2 לייקים

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.