# Generated by Django 2.1.3 on 2018-11-25 02:36

import books.models
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    dependencies = [
        ('books', '0022_auto_20181124_2037'),
    ]

    operations = [
        migrations.CreateModel(
            name='Upload',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('image', models.ImageField(upload_to=books.models.get_image_path)),
                ('book', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='uploads', to='books.Book')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.RemoveField(
            model_name='social',
            name='book',
        ),
        migrations.AddField(
            model_name='comment',
            name='book',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, to='books.Book'),
        ),
        migrations.DeleteModel(
            name='Social',
        ),
    ]
