# Generated by Django 2.2.19 on 2021-04-14 21:16

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


class Migration(migrations.Migration):

    dependencies = [
        ('books', '0024_auto_20210218_1336'),
    ]

    operations = [
        migrations.CreateModel(
            name='ChapterSnapshot',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title_hidden', models.BooleanField(default=False)),
                ('description_hidden', models.BooleanField(default=False)),
                ('chapter', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='chapter_snapshots', to='books.Chapter')),
            ],
        ),
        migrations.CreateModel(
            name='Snapshot',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('chapters', models.ManyToManyField(through='books.ChapterSnapshot', to='books.Chapter')),
                ('hidden_content_blocks', models.ManyToManyField(related_name='hidden_for_snapshots', to='books.ContentBlock')),
                ('module', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='books.Module')),
            ],
        ),
        migrations.CreateModel(
            name='ContentBlockSnapshot',
            fields=[
                ('contentblock_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='books.ContentBlock')),
                ('hidden', models.BooleanField(default=False)),
                ('snapshot', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='custom_content_blocks', to='books.Snapshot')),
            ],
            options={
                'abstract': False,
            },
            bases=('books.contentblock',),
        ),
        migrations.AddField(
            model_name='chaptersnapshot',
            name='snapshot',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='chapter_snapshots', to='books.Snapshot'),
        ),
    ]
