angee.spaces.runtime_migrations.thread_groups
Preserve thread group audiences while moving ThreadSpace.group to groups.
Reverse is intentionally not data-preserving because collapsing M2M audiences back to one FK would be lossy.
applies
python
def applies(project_state: ProjectState) -> boolReturn whether messaging.Thread still has the exact legacy single group FK.
copy_thread_group_to_groups
python
def copy_thread_group_to_groups(apps, schema_editor) -> NoneCopy each legacy Thread.group FK into the new Thread.groups M2M table.
Migration
python
class Migration(migrations.Migration)Move ThreadSpace's single group pointer to a losslessly backfilled audience M2M.