def create_default_project_admins(apps, schema_editor):  # type: ignore[no-untyped-def]
    """
    Iterates over all basic users on the platform and makes them admins on all projects in their organisation.
    """
    UserOrganisation = apps.get_model('organisations', 'UserOrganisation')
    UserProjectPermission = apps.get_model('projects', 'UserProjectPermission')

    for user_organisation in UserOrganisation.objects.filter(role=OrganisationRole.USER.name):
        for project in user_organisation.organisation.projects.all():
            UserProjectPermission.objects.create(project=project, user=user_organisation.user, admin=True)

    Iterates over all basic users on the platform and makes them admins on all projects in their organisation.
    
api/projects/migrations/0005_auto_20200221_2317.py