def METHOD_NAME():
    # The database router prevents migration of coding system tables on
    # the default database.
    for app in apps.app_configs:
        for model_cls in apps.app_configs[app].get_models():
            if app in CODING_SYSTEMS:
                # Coding system apps are not allowed to migrate on the default database, and raise
                # an OperationError as the tables haven't been created.
                with pytest.raises(
                    OperationalError, match=f"no such table: {model_cls._meta.db_table}"
                ):
                    model_cls.objects.using(DEFAULT_DB_ALIAS).count()
            else:
                # All other apps can be migrated and accessed with the default database
                model_cls.objects.using(DEFAULT_DB_ALIAS).count()