# Generated by Django 2.1.3 on 2019-10-16 03:20

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),
        ('giftsharingapp', '0018_auto_20191015_1411'),
    ]

    operations = [
        migrations.CreateModel(
            name='GiftNote',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('message', models.TextField(blank=True, max_length=2000, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='GroupMembership',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_active', models.BooleanField(default=True)),
                ('member_since', models.DateTimeField(auto_now_add=True, null=True)),
            ],
        ),
        migrations.RenameField(
            model_name='gift',
            old_name='filled',
            new_name='taken',
        ),
        migrations.RenameField(
            model_name='userinfo',
            old_name='accepted_friendinvite',
            new_name='invited',
        ),
        migrations.RemoveField(
            model_name='gift',
            name='date_saved',
        ),
        migrations.RemoveField(
            model_name='gift',
            name='filled_by',
        ),
        migrations.RemoveField(
            model_name='userinfo',
            name='gifter_groups',
        ),
        migrations.AddField(
            model_name='friendinvite',
            name='is_group_invite',
            field=models.BooleanField(default=False),
        ),
        migrations.AddField(
            model_name='friendship',
            name='friends_since',
            field=models.DateTimeField(auto_now_add=True, null=True),
        ),
        migrations.AddField(
            model_name='gift',
            name='created_for',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='gift_suggested_for_user', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='gift',
            name='date_created',
            field=models.DateTimeField(auto_now_add=True, null=True),
        ),
        migrations.AddField(
            model_name='gift',
            name='date_last_changed',
            field=models.DateTimeField(auto_now_add=True, null=True),
        ),
        migrations.AddField(
            model_name='gift',
            name='date_received',
            field=models.DateTimeField(blank=True, null=True),
        ),
        migrations.AddField(
            model_name='gift',
            name='date_taken',
            field=models.DateTimeField(blank=True, null=True),
        ),
        migrations.AddField(
            model_name='gift',
            name='gift_visible_for_receiver',
            field=models.BooleanField(default=True),
        ),
        migrations.AddField(
            model_name='gift',
            name='received',
            field=models.BooleanField(default=False),
        ),
        migrations.AddField(
            model_name='gift',
            name='taken_by',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='gift_filled_by_user', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='gift',
            name='taken_visible_for_receiver',
            field=models.BooleanField(default=False),
        ),
        migrations.AlterField(
            model_name='friendinvite',
            name='date_sent',
            field=models.DateTimeField(auto_now_add=True, null=True),
        ),
        migrations.AlterField(
            model_name='friendship',
            name='user1',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='friendship_initiated', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AlterField(
            model_name='friendship',
            name='user2',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='friendship_accepted', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AlterField(
            model_name='gift',
            name='owner',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='gift_added_by_user', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AlterField(
            model_name='giftergroup',
            name='date_created',
            field=models.DateTimeField(auto_now_add=True, null=True),
        ),
        migrations.AlterField(
            model_name='notification',
            name='date_created',
            field=models.DateTimeField(auto_now_add=True, null=True),
        ),
        migrations.AddField(
            model_name='groupmembership',
            name='giftergroup',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='groups_memberships', to='giftsharingapp.GifterGroup'),
        ),
        migrations.AddField(
            model_name='groupmembership',
            name='groupinvite',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='giftsharingapp.FriendInvite'),
        ),
        migrations.AddField(
            model_name='groupmembership',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='users_memberships', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='giftnote',
            name='gift',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='giftsharingapp.Gift'),
        ),
        migrations.AddField(
            model_name='giftnote',
            name='owner',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='note_added_by_user', to=settings.AUTH_USER_MODEL),
        ),
    ]
