Skip to content

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) -> bool

Return 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) -> None

Copy 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.

Released under the AGPL-3.0 License.