text: # Generated by Django 3.1.2 on 2021-01-06 11:19
  
  from django.conf import settings
  from django.db import migrations, models
  import django.db.models.deletion
  import taggit.managers
  
  
  class Migration(migrations.Migration):
  
      initial = True
  
      dependencies = [
          ('taggit', '0003_taggeditem_add_unique_index'),
          migrations.swappable_dependency(settings.AUTH_USER_MODEL),
      ]
  
      operations = [
          migrations.CreateModel(
              name='TagDict',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('tag', models.CharField(max_length=100)),
                  ('count', models.IntegerField(default=0)),
              ],
          ),
          migrations.CreateModel(
              name='Profile',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('profile_image', models.ImageField(blank=True, default='default.jpeg', null=True, upload_to='profile_pics')),
                  ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
              ],
          ),
          migrations.CreateModel(
              name='Post',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('category', models.CharField(choices=[('1', 'Programming/Technology'), ('2', 'Health/Fitness'), ('3', 'Personal'), ('4', 'Fashion'), ('5', 'Food'), ('6', 'Travel'), ('7', 'Business'), ('8', 'Art'), ('9', 'Other')], default='1', max_length=20)),
                  ('title', models.CharField(max_length=200, unique=True)),
                  ('slug', models.SlugField(editable=False, max_length=200, unique=True)),
                  ('updated_on', models.DateTimeField(auto_now=True)),
                  ('content', models.TextField()),
                  ('created_on', models.DateTimeField(auto_now_add=True)),
                  ('read_count', models.IntegerField(default=0, editable=False)),
                  ('read_time', models.IntegerField(default=0, editable=False)),
                  ('image', models.ImageField(blank=True, null=True, upload_to='images/')),
                  ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
                  ('likes', models.ManyToManyField(blank=True, related_name='post_likes', to=settings.AUTH_USER_MODEL)),
                  ('tags', taggit.managers.TaggableManager(blank=True, help_text='A comma-separated list of tags.', through='taggit.TaggedItem', to='taggit.Tag', verbose_name='Tags')),
              ],
              options={
                  'ordering': ['-created_on'],
              },
          ),
          migrations.CreateModel(
              name='FavouritePost',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('posts', models.ManyToManyField(to='core.Post')),
                  ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
              ],
          ),
          migrations.CreateModel(
              name='Comment',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('name', models.CharField(max_length=80)),
                  ('body', models.TextField()),
                  ('created_on', models.DateTimeField(auto_now_add=True)),
                  ('parent', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='replies', to='core.comment')),
                  ('post', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='comments', to='core.post')),
              ],
              options={
                  'ordering': ['created_on'],
              },
          ),
      ]
  