# Generated by Django 4.2 on 2023-05-08 09:08

from django.db import migrations, models


class Migration(migrations.Migration):
    dependencies = [
        ("scanpipe", "0031_scancode_toolkit_v32_data_updates"),
    ]

    operations = [
        migrations.RemoveField(
            model_name="discoveredpackage",
            name="contains_source_code",
        ),
        migrations.RemoveField(
            model_name="discoveredpackage",
            name="manifest_path",
        ),
        migrations.RemoveField(
            model_name="codebaseresource",
            name="license_expressions",
        ),
        migrations.RemoveField(
            model_name="codebaseresource",
            name="licenses",
        ),
        migrations.AddIndex(
            model_name="discoveredpackage",
            index=models.Index(
                fields=["declared_license_expression"],
                name="scanpipe_di_declare_4b8499_idx",
            ),
        ),
        migrations.AddIndex(
            model_name="discoveredpackage",
            index=models.Index(
                fields=["other_license_expression"],
                name="scanpipe_di_other_l_1f1616_idx",
            ),
        ),
        migrations.AddIndex(
            model_name="codebaseresource",
            index=models.Index(
                fields=["detected_license_expression"],
                name="scanpipe_co_detecte_f3f97d_idx",
            ),
        ),
        # Extra fields alterations and index additions
        migrations.AlterField(
            model_name="discoveredpackage",
            name="package_uid",
            field=models.CharField(
                blank=True,
                help_text="Unique identifier for this package.",
                max_length=1024,
            ),
        ),
        migrations.AlterField(
            model_name="project",
            name="created_date",
            field=models.DateTimeField(
                auto_now_add=True, help_text="Creation date for this project."
            ),
        ),
        migrations.AlterField(
            model_name="project",
            name="name",
            field=models.CharField(
                help_text="Name for this project.", max_length=100, unique=True
            ),
        ),
        migrations.AddIndex(
            model_name="discoveredpackage",
            index=models.Index(
                fields=["package_uid"], name="scanpipe_di_package_379c99_idx"
            ),
        ),
        migrations.AddIndex(
            model_name="project",
            index=models.Index(
                fields=["-created_date"], name="scanpipe_pr_created_258a96_idx"
            ),
        ),
        migrations.AddIndex(
            model_name="project",
            index=models.Index(
                fields=["is_archived"], name="scanpipe_pr_is_arch_6af64f_idx"
            ),
        ),
        migrations.AddIndex(
            model_name="project",
            index=models.Index(fields=["name"], name="scanpipe_pr_name_c81038_idx"),
        ),
    ]
