# Generated by Django 4.0.5 on 2023-03-05 01:50

from django.db import migrations, models


class Migration(migrations.Migration):
    dependencies = [
        (
            "metering_billing",
            "0223_remove_historicalsubscriptionrecord_fully_billed_and_more",
        ),
    ]

    operations = [
        migrations.RemoveConstraint(
            model_name="planversion",
            name="unique_plan_version",
        ),
        migrations.AlterField(
            model_name="planversion",
            name="version",
            field=models.PositiveSmallIntegerField(default=1),
        ),
        migrations.AddConstraint(
            model_name="planversion",
            constraint=models.UniqueConstraint(
                condition=models.Q(("is_custom", False)),
                fields=("plan", "version", "currency"),
                name="unique_plan_version_per_currency",
            ),
        ),
    ]
