<filename>instaapp/migrations/0009_auto_20211205_1444.py<gh_stars>0
# Generated by Django 3.2.7 on 2021-12-05 11:44

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


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('instaapp', '0008_alter_profiles_posts'),
    ]

    operations = [
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('comment', models.TextField()),
            ],
        ),
        migrations.CreateModel(
            name='Follows',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
            ],
        ),
        migrations.CreateModel(
            name='Like',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
            ],
        ),
        migrations.RemoveField(
            model_name='likes',
            name='image',
        ),
        migrations.RemoveField(
            model_name='likes',
            name='user',
        ),
        migrations.RemoveField(
            model_name='profiles',
            name='user',
        ),
        migrations.RenameField(
            model_name='images',
            old_name='image',
            new_name='photo',
        ),
        migrations.RemoveField(
            model_name='images',
            name='caption',
        ),
        migrations.RemoveField(
            model_name='images',
            name='comment_count',
        ),
        migrations.RemoveField(
            model_name='images',
            name='created_at',
        ),
        migrations.RemoveField(
            model_name='images',
            name='like_count',
        ),
        migrations.RemoveField(
            model_name='images',
            name='name',
        ),
        migrations.RemoveField(
            model_name='images',
            name='profile',
        ),
        migrations.RemoveField(
            model_name='profile',
            name='contact',
        ),
        migrations.RemoveField(
            model_name='profile',
            name='created_at',
        ),
        migrations.AddField(
            model_name='images',
            name='photo_caption',
            field=models.TextField(null=True),
        ),
        migrations.AddField(
            model_name='images',
            name='photo_name',
            field=models.CharField(max_length=60, null=True),
        ),
        migrations.AddField(
            model_name='images',
            name='posted_at',
            field=models.DateTimeField(auto_now_add=True, null=True),
        ),
        migrations.AlterField(
            model_name='images',
            name='user',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AlterField(
            model_name='profile',
            name='bio',
            field=models.TextField(null=True),
        ),
        migrations.DeleteModel(
            name='Comments',
        ),
        migrations.DeleteModel(
            name='Likes',
        ),
        migrations.DeleteModel(
            name='Profiles',
        ),
        migrations.AddField(
            model_name='like',
            name='image',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='photolikes', to='instaapp.images'),
        ),
        migrations.AddField(
            model_name='like',
            name='liker',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='userlikes', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='follows',
            name='followee',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='followers', to='instaapp.profile'),
        ),
        migrations.AddField(
            model_name='follows',
            name='follower',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='following', to='instaapp.profile'),
        ),
        migrations.AddField(
            model_name='comment',
            name='photo',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='comments', to='instaapp.images'),
        ),
        migrations.AddField(
            model_name='comment',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='comments', to=settings.AUTH_USER_MODEL),
        ),
    ]
