# Generated by Django 3.1.1 on 2020-10-01 18:32
import django.db.models.deletion
from django.db import migrations
from django.db import models


class Migration(migrations.Migration):

    dependencies = [
        ("sleuthpr", "0005_pullrequest_base_sha"),
    ]

    operations = [
        migrations.CreateModel(
            name="RepositoryCommit",
            fields=[
                ("id", models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
                ("sha", models.CharField(db_index=True, max_length=1024, verbose_name="sha")),
                ("message", models.TextField(max_length=16384, verbose_name="message")),
                (
                    "repository",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="commits",
                        to="sleuthpr.repository",
                        verbose_name="repository",
                    ),
                ),
            ],
        ),
        migrations.CreateModel(
            name="RepositoryCommitParent",
            fields=[
                ("id", models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
                (
                    "child",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="parents",
                        to="sleuthpr.repositorycommit",
                        verbose_name="child",
                    ),
                ),
                (
                    "parent",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="children",
                        to="sleuthpr.repositorycommit",
                        verbose_name="parent",
                    ),
                ),
                (
                    "repository",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="commit_tree",
                        to="sleuthpr.repository",
                        verbose_name="repository",
                    ),
                ),
            ],
        ),
    ]
