text: # Generated by Django 3.0.8 on 2020-10-30 23:16
  
  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=30, unique=True)),
                  ('created_on', models.DateTimeField(auto_now_add=True)),
              ],
              options={
                  'ordering': ['-created_on'],
              },
          ),
          migrations.CreateModel(
              name='Post',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('title', models.CharField(max_length=50)),
                  ('photo', models.ImageField(upload_to='user_posts')),
                  ('content', models.TextField()),
                  ('created_on', models.DateTimeField(auto_now_add=True)),
                  ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='posts', to=settings.AUTH_USER_MODEL)),
                  ('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='posts', to='public.Category')),
              ],
              options={
                  'ordering': ['-created_on'],
              },
          ),
      ]
  