# Generated by Django 3.2.5 on 2021-09-06 09:49

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='BlogPost',
            fields=[
                ('id', models.BigAutoField(auto_created=True,
                 primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateTimeField(auto_now_add=True)),
                ('blog_title', models.CharField(blank=True,
                 max_length=254, null=True)),
                ('blog_preview', models.CharField(blank=True,
                 max_length=254, null=True)),
                ('blog_content', models.TextField()),
                ('image_url', models.URLField(blank=True,
                 max_length=1024, null=True)),
                ('image', models.ImageField(blank=True,
                 null=True, upload_to='')),
                ('author', models.ForeignKey(
                    on_delete=django.db.models.deletion.CASCADE,
                    to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='BlogComment',
            fields=[
                ('id', models.BigAutoField(
                    auto_created=True, primary_key=True,
                    serialize=False, verbose_name='ID')),
                ('date', models.DateTimeField(auto_now_add=True)),
                ('comment_title', models.CharField(max_length=50)),
                ('comment', models.TextField(max_length=1024)),
                ('blogpost', models.ForeignKey(
                    on_delete=django.db.models.deletion.CASCADE,
                    related_name='comments', to='blog.blogpost')),
                ('comment_user', models.ForeignKey(
                    on_delete=django.db.models.deletion.CASCADE,
                    to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
