# Generated by Django 3.0.8 on 2020-08-06 19:16

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


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ("blogs", "0002_auto_20200805_1725"),
    ]

    operations = [
        migrations.AlterModelOptions(
            name="comment", options={"ordering": ("-created",)},
        ),
        migrations.AlterModelOptions(
            name="post", options={"ordering": ("author__username",)},
        ),
        migrations.AddField(
            model_name="comment",
            name="active",
            field=models.BooleanField(default=True),
        ),
        migrations.AddField(
            model_name="comment",
            name="created",
            field=models.DateTimeField(auto_now_add=True, null=True),
        ),
        migrations.AddField(
            model_name="comment",
            name="parent",
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name="replies",
                to="blogs.Comment",
            ),
        ),
        migrations.AlterField(
            model_name="comment",
            name="author",
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name="author",
                to=settings.AUTH_USER_MODEL,
            ),
        ),
    ]
