discourse-solved/db/migrate
Natalie Tay 1805184cde
FIX: Multiple topics may have the same post as its solution (#348)
We are seeing some errors when migrating and adding indexes on `answer_post_id`.

```
#<StandardError:"An error has occurred, all later migrations canceled:\n\nPG::UniqueViolation: ERROR:  could not create unique index \"index_discourse_solved_solved_topics_on_answer_post_id\"\nDETAIL:  Key (answer_post_id)=(13006) is duplicated.\n">
```

This PR modifies the earlier migration, and also adds one before the addition of indexes to remove duplicates.
2025-03-26 22:21:32 +08:00
..
20191209095548_ensures_unique_accepted_answer_post_id.rb DEV: Introduce syntax_tree for ruby formatting (#217) 2022-12-23 20:36:08 +00:00
20210218022053_solved_fix_high_auto_close_topic_hours.rb FIX: Add min/max values for auto close hours (#121) 2021-02-18 13:49:39 +10:00
20210429154322_remove_nil_custom_fields_from_solved.rb DEV: Promote historic post_deploy migrations (#216) 2022-12-19 17:28:01 +02:00
20210618142654_recreate_solutions_column.rb Re-add usage of `add_directory_column` for user directory table solutions count (#140) 2021-06-22 13:18:23 -05:00
20221121223417_rename_badges.rb DEV: Introduce syntax_tree for ruby formatting (#217) 2022-12-23 20:36:08 +00:00
20240116100023_fill_accept_all_solutions_allowed_groups_based_on_deprecated_setting.rb DEV: Promote historical post-deploy migrations (#331) 2025-01-24 11:48:56 -03:00
20250318024824_create_discourse_solved_solved_topics.rb DEV: Move solved custom fields into a table (#342) 2025-03-25 14:51:32 +08:00
20250318024953_copy_solved_topic_custom_field_to_discourse_solved_solved_topics.rb FIX: Multiple topics may have the same post as its solution (#348) 2025-03-26 22:21:32 +08:00
20250318024954_remove_duplicates_from_discourse_solved_solved_topics.rb FIX: Multiple topics may have the same post as its solution (#348) 2025-03-26 22:21:32 +08:00
20250318025147_add_index_for_discourse_solved_topics.rb DEV: Move solved custom fields into a table (#342) 2025-03-25 14:51:32 +08:00
20250325074111_copy_remaining_solved_topic_custom_field_to_discourse_solved_solved_topics.rb FIX: Multiple topics may have the same post as its solution (#348) 2025-03-26 22:21:32 +08:00