text: # Generated by Django 3.1.2 on 2020-10-27 19:01
  
  from django.conf import settings
  from django.db import migrations, models
  import django.db.models.deletion
  import django.utils.timezone
  
  
  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')),
                  ('name', models.CharField(max_length=100)),
              ],
          ),
          migrations.CreateModel(
              name='Post',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('title', models.CharField(max_length=250)),
                  ('excerpt', models.TextField(null=True)),
                  ('content', models.TextField()),
                  ('slug', models.SlugField(max_length=250, unique_for_date='published')),
                  ('published', models.DateTimeField(default=django.utils.timezone.now)),
                  ('status', models.CharField(choices=[('draft', 'Draft'), ('published', 'Published')], default='published', max_length=10)),
                  ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='blog_posts', to=settings.AUTH_USER_MODEL)),
                  ('category', models.ForeignKey(default=1, on_delete=django.db.models.deletion.PROTECT, to='blog.category')),
              ],
              options={
                  'ordering': ('-published',),
              },
          ),
      ]
  