# Generated by Django 3.0.1 on 2020-02-05 06:08

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


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('mainApp', '0003_auto_20200203_1419'),
    ]

    operations = [
        migrations.CreateModel(
            name='Alert',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_comment', models.BooleanField()),
                ('creation_date', models.DateTimeField(default=django.utils.timezone.now)),
                ('has_been_seen', models.BooleanField(default=False)),
                ('by_user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AlterUniqueTogether(
            name='followalerts',
            unique_together=None,
        ),
        migrations.AlterIndexTogether(
            name='followalerts',
            index_together=None,
        ),
        migrations.RemoveField(
            model_name='followalerts',
            name='follower',
        ),
        migrations.RemoveField(
            model_name='followalerts',
            name='user',
        ),
        migrations.AlterField(
            model_name='comment',
            name='creationDate',
            field=models.DateTimeField(default=django.utils.timezone.now),
        ),
        migrations.DeleteModel(
            name='CommentAlerts',
        ),
        migrations.DeleteModel(
            name='FollowAlerts',
        ),
        migrations.AddField(
            model_name='alert',
            name='comment',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='mainApp.Comment'),
        ),
        migrations.AddField(
            model_name='alert',
            name='post',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='mainApp.Post'),
        ),
        migrations.AddField(
            model_name='alert',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='alerts', to=settings.AUTH_USER_MODEL),
        ),
    ]
