text: # Generated by Django 2.2.1 on 2019-05-12 20:20
  
  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='Category',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('title', models.CharField(max_length=20)),
              ],
          ),
          migrations.CreateModel(
              name='Post',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('title', models.CharField(max_length=90)),
                  ('subcontent', models.TextField(default='')),
                  ('content', models.TextField(default='')),
                  ('slug', models.CharField(default='', max_length=60)),
                  ('post_id', models.IntegerField(default=None)),
                  ('date', models.DateTimeField(auto_now=True)),
                  ('comment_cnt', models.IntegerField(default=0)),
                  ('image', models.ImageField(upload_to='')),
                  ('featured', models.BooleanField(default=False)),
                  ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
                  ('categories', models.ManyToManyField(to='posts.Category')),
              ],
          ),
          migrations.CreateModel(
              name='Comment',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('email', models.EmailField(max_length=20)),
                  ('content', models.TextField()),
                  ('date', models.DateTimeField(auto_now=True)),
                  ('parent', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='replies', to='posts.Comment')),
                  ('post', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='comments', to='posts.Post')),
                  ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
              ],
          ),
      ]
  