# Generated by Django 2.1.2 on 2019-01-15 18:33

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


class Migration(migrations.Migration):
    dependencies = [
        ("references", "0006_auto_20181022_2113"),
    ]

    operations = [
        migrations.SeparateDatabaseAndState(
            state_operations=[
                migrations.CreateModel(
                    name="ReferenceFromCase",
                    fields=[
                        (
                            "id",
                            models.AutoField(
                                auto_created=True,
                                primary_key=True,
                                serialize=False,
                                verbose_name="ID",
                            ),
                        ),
                    ],
                    options={
                        "db_table": "references_casereferencemarker_references",
                    },
                ),
                migrations.CreateModel(
                    name="ReferenceFromLaw",
                    fields=[
                        (
                            "id",
                            models.AutoField(
                                auto_created=True,
                                primary_key=True,
                                serialize=False,
                                verbose_name="ID",
                            ),
                        ),
                    ],
                    options={
                        "db_table": "references_lawreferencemarker_references",
                    },
                ),
                migrations.AlterField(
                    model_name="casereferencemarker",
                    name="references",
                    field=models.ManyToManyField(
                        through="references.ReferenceFromCase",
                        to="references.Reference",
                    ),
                ),
                migrations.AlterField(
                    model_name="lawreferencemarker",
                    name="references",
                    field=models.ManyToManyField(
                        through="references.ReferenceFromLaw", to="references.Reference"
                    ),
                ),
                migrations.AddField(
                    model_name="referencefromlaw",
                    name="marker",
                    field=models.ForeignKey(
                        db_column="lawreferencemarker_id",
                        on_delete=django.db.models.deletion.CASCADE,
                        to="references.LawReferenceMarker",
                    ),
                ),
                migrations.AddField(
                    model_name="referencefromlaw",
                    name="reference",
                    field=models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        to="references.Reference",
                    ),
                ),
                migrations.AddField(
                    model_name="referencefromcase",
                    name="marker",
                    field=models.ForeignKey(
                        db_column="casereferencemarker_id",
                        on_delete=django.db.models.deletion.CASCADE,
                        to="references.CaseReferenceMarker",
                    ),
                ),
                migrations.AddField(
                    model_name="referencefromcase",
                    name="reference",
                    field=models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        to="references.Reference",
                    ),
                ),
            ]
        )
    ]
