def METHOD_NAME(project, ProjectOwnership, Rule):
    with transaction.atomic("default"):
        # Determine whether this project has a fallback setting.
        fallthrough_choice = None
        try:
            ownership = ProjectOwnership.objects.get(project=project)
            fallthrough_choice = "AllMembers" if ownership and ownership.fallthrough else "NoOne"
        except ProjectOwnership.DoesNotExist:
            # Projects without fallbacks will be assigned the new "ActiveMembers" default.
            fallthrough_choice = "ActiveMembers"
        # We only migrate rules that are not pending deletion.
        for rule in Rule.objects.filter(project=project, status=RuleStatus.ACTIVE.value):
            set_issue_alert_fallback(rule, fallthrough_choice)