# Generated by Django 5.1.7 on 2025-03-22 17:46

import django.db.models.expressions
import django.db.models.functions.comparison
from django.db import migrations, models


class Migration(migrations.Migration):
    dependencies = [
        ("games", "0010_remove_purchase_price_per_game"),
    ]

    operations = [
        migrations.AddField(
            model_name="purchase",
            name="price_per_game",
            field=models.GeneratedField(
                db_persist=True,
                expression=django.db.models.expressions.CombinedExpression(
                    django.db.models.functions.comparison.Coalesce(
                        models.F("converted_price"), models.F("price"), 0
                    ),
                    "/",
                    models.F("num_purchases"),
                ),
                output_field=models.FloatField(),
            ),
        ),
    ]
