def METHOD_NAME(apps, schema_editor):
    ProductVariant = apps.get_model("product", "ProductVariant")
    Stock = apps.get_model("warehouse", "Stock")
    if not ProductVariant.objects.exists():
        return
    product_variants = ProductVariant.objects.all()
    warehouse = get_or_create_warehouse(apps)
    stocks = [
        Stock(
            product_variant=variant,
            warehouse=warehouse,
            quantity=variant.quantity,
            quantity_allocated=variant.quantity_allocated,
        )
        for variant in product_variants.iterator()
    ]
    Stock.objects.bulk_create(stocks)