# Generated by Django 3.1.7 on 2023-01-04 04:16

from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ("repository", "0036_fix_package_last_updated"),
    ]

    operations = [
        migrations.RemoveConstraint(
            model_name="packageversion",
            name="valid_package_format",
        ),
        migrations.AddField(
            model_name="packageversion",
            name="changelog",
            field=models.TextField(blank=True, null=True),
        ),
        migrations.AlterField(
            model_name="packageversion",
            name="format_spec",
            field=models.TextField(
                blank=True,
                choices=[
                    ("thunderstore.io:v0.0", "V0 0"),
                    ("thunderstore.io:v0.1", "V0 1"),
                    ("thunderstore.io:v0.2", "V0 2"),
                ],
                help_text="Used to track the latest package format spec this package is compatible with",
                null=True,
            ),
        ),
        migrations.AddConstraint(
            model_name="packageversion",
            constraint=models.CheckConstraint(
                check=models.Q(
                    ("format_spec", None),
                    ("format_spec", "thunderstore.io:v0.0"),
                    ("format_spec", "thunderstore.io:v0.1"),
                    ("format_spec", "thunderstore.io:v0.2"),
                    _connector="OR",
                ),
                name="valid_package_format",
            ),
        ),
    ]
