This migration adds a missed unique constraint to ComponentType:
https://github.com/openedx/openedx-core/blob/02908dbbcbc19e1160f493a6931c75d1cd23f195/src/openedx_content/migrations/0004_componenttype_constraint.py
But people with existing installations may have invalid data that violates this constraint - see this forum post for example.
To help with cleaning this up, the migration should be updated to automatically clean up invalid data before applying the constraint.
If people have the migration already applied, no action is necessary for them, and it's fine to change the migration as long as it only does data changes.
we should just consolidate on the earliest ComponentType entry in any set of duplicates and adjust any Components that were pointing to the later duplicates [, then delete the duplicates]
This migration adds a missed unique constraint to
ComponentType:https://github.com/openedx/openedx-core/blob/02908dbbcbc19e1160f493a6931c75d1cd23f195/src/openedx_content/migrations/0004_componenttype_constraint.py
But people with existing installations may have invalid data that violates this constraint - see this forum post for example.
To help with cleaning this up, the migration should be updated to automatically clean up invalid data before applying the constraint.
If people have the migration already applied, no action is necessary for them, and it's fine to change the migration as long as it only does data changes.