# Generated by Django 5.2.7 on 2025-10-29 15:16

from django.db import migrations, models

import lamindb.base.fields


class Migration(migrations.Migration):
    dependencies = [
        ("lamindb", "0138_remove_record_linked_users_user_linked_in_records"),
    ]

    operations = [
        migrations.AlterField(
            model_name="reference",
            name="text",
            field=lamindb.base.fields.TextField(blank=True, default=None, null=True),
        ),
        migrations.RemoveField(
            model_name="artifact",
            name="ulabels",
        ),
        migrations.RemoveField(
            model_name="artifact",
            name="users",
        ),
        migrations.AddField(
            model_name="ulabel",
            name="artifacts",
            field=models.ManyToManyField(
                related_name="ulabels",
                through="lamindb.ArtifactULabel",
                to="lamindb.artifact",
            ),
        ),
        migrations.AddField(
            model_name="user",
            name="artifacts",
            field=models.ManyToManyField(
                related_name="users",
                through="lamindb.ArtifactUser",
                through_fields=("user", "artifact"),
                to="lamindb.artifact",
            ),
        ),
        migrations.RemoveField(
            model_name="record",
            name="linked_artifacts",
        ),
        migrations.RemoveField(
            model_name="record",
            name="linked_runs",
        ),
        migrations.RemoveField(
            model_name="record",
            name="linked_ulabels",
        ),
        migrations.AddField(
            model_name="artifact",
            name="linked_in_records",
            field=models.ManyToManyField(
                related_name="linked_artifacts",
                through="lamindb.RecordArtifact",
                to="lamindb.record",
            ),
        ),
        migrations.AddField(
            model_name="run",
            name="linked_in_records",
            field=models.ManyToManyField(
                related_name="linked_runs",
                through="lamindb.RecordRun",
                to="lamindb.record",
            ),
        ),
        migrations.AddField(
            model_name="ulabel",
            name="linked_in_records",
            field=models.ManyToManyField(
                related_name="linked_ulabels",
                through="lamindb.RecordULabel",
                to="lamindb.record",
            ),
        ),
    ]
