# Generated by Django 5.1.7 on 2025-03-25 20:30

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


class Migration(migrations.Migration):
    dependencies = [
        ("games", "0011_purchase_price_per_game"),
    ]

    operations = [
        migrations.RemoveField(
            model_name="session",
            name="duration_calculated",
        ),
        migrations.AddField(
            model_name="session",
            name="duration_calculated",
            field=models.GeneratedField(
                db_persist=True,
                expression=django.db.models.functions.comparison.Coalesce(
                    django.db.models.expressions.CombinedExpression(
                        models.F("timestamp_end"), "-", models.F("timestamp_start")
                    ),
                    0,
                ),
                output_field=models.DurationField(),
            ),
        ),
    ]
