# Generated by Django 4.2.2 on 2023-06-21 21:32

import django.db.models.deletion
from django.db import migrations, models

import lnschema_core.users


class Migration(migrations.Migration):
    dependencies = [
        ("lnschema_core", "0003_alter_storage_region_alter_transform_short_name"),
    ]

    operations = [
        migrations.RenameModel(
            old_name="Folder",
            new_name="Tag",
        ),
        migrations.AlterUniqueTogether(
            name="tag",
            unique_together=set(),
        ),
        migrations.RemoveField(
            model_name="tag",
            name="key",
        ),
        migrations.RemoveField(
            model_name="tag",
            name="storage",
        ),
        migrations.AlterField(
            model_name="tag",
            name="created_by",
            field=models.ForeignKey(
                default=lnschema_core.users.current_user_id, on_delete=django.db.models.deletion.PROTECT, related_name="created_tags", to="lnschema_core.user"
            ),
        ),
        migrations.AlterField(
            model_name="tag",
            name="files",
            field=models.ManyToManyField(related_name="tags", to="lnschema_core.file"),
        ),
        migrations.RemoveField(
            model_name="project",
            name="folders",
        ),
        migrations.AddField(
            model_name="project",
            name="tags",
            field=models.ManyToManyField(related_name="projects", to="lnschema_core.tag"),
        ),
        migrations.AlterField(
            model_name="tag",
            name="id",
            field=models.CharField(default=lnschema_core.ids.base62_8, max_length=8, primary_key=True, serialize=False),
        ),
        migrations.AlterField(
            model_name="tag",
            name="name",
            field=models.CharField(db_index=True, default=None, max_length=255, unique=True),
        ),
    ]
