# Generated by Django 3.2.2 on 2023-01-30 18:30

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


class Migration(migrations.Migration):

    dependencies = [
        ("versions", "0005_version_active"),
        ("libraries", "0003_library_slug"),
    ]

    operations = [
        migrations.CreateModel(
            name="LibraryVersion",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "library",
                    models.ForeignKey(
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        related_name="library_version",
                        to="libraries.library",
                    ),
                ),
                (
                    "version",
                    models.ForeignKey(
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        related_name="library_version",
                        to="versions.version",
                    ),
                ),
            ],
        ),
        migrations.AddField(
            model_name="library",
            name="versions",
            field=models.ManyToManyField(
                related_name="libraries",
                through="libraries.LibraryVersion",
                to="versions.Version",
            ),
        ),
    ]
