# Generated by Django 3.2 on 2021-05-05 09:39

import datetime
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
from django.utils.timezone import utc


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('app_user_activity', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Follow',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_date', models.DateTimeField(auto_now_add=True)),
                ('follower', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='follower', to=settings.AUTH_USER_MODEL)),
                ('following', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='following', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Like',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('liked_date', models.DateTimeField()),
            ],
        ),
        migrations.AlterModelOptions(
            name='userpost',
            options={'ordering': ['-upload_date']},
        ),
        migrations.RenameField(
            model_name='userpost',
            old_name='user',
            new_name='author',
        ),
        migrations.AddField(
            model_name='userpost',
            name='update_time',
            field=models.DateTimeField(auto_now=True),
        ),
        migrations.AddField(
            model_name='userpost',
            name='upload_date',
            field=models.DateTimeField(auto_now_add=True, default=datetime.datetime(2021, 5, 5, 9, 39, 1, 541804, tzinfo=utc)),
            preserve_default=False,
        ),
        migrations.DeleteModel(
            name='PostImages',
        ),
        migrations.AddField(
            model_name='like',
            name='post_liked',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='liked_post', to='app_user_activity.userpost'),
        ),
        migrations.AddField(
            model_name='like',
            name='user_liked',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='liker', to=settings.AUTH_USER_MODEL),
        ),
    ]
