# Generated by Django 3.2.4 on 2021-08-05 14:20

import aleksis.core.managers
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    dependencies = [
        ('sites', '0002_alter_domain_unique'),
        ('contenttypes', '0002_remove_content_type_name'),
        ('resint', '0005_fix_permissions'),
    ]

    operations = [
        migrations.CreateModel(
            name='LiveDocument',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('extended_data', models.JSONField(default=dict, editable=False)),
                ('slug', models.SlugField(help_text='This will be used for the name of the current PDF file.', verbose_name='Slug')),
                ('name', models.CharField(max_length=255, verbose_name='Name')),
                ('current_file', models.FileField(blank=True, editable=False, null=True, upload_to='live_documents/', verbose_name='Current file')),
                ('last_update_triggered_manually', models.BooleanField(default=False, editable=False, verbose_name='Was the last update triggered manually?')),
                ('polymorphic_ctype', models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='polymorphic_resint.livedocument_set+', to='contenttypes.contenttype')),
                ('site', models.ForeignKey(default=1, editable=False, on_delete=django.db.models.deletion.CASCADE, to='sites.site')),
            ],
            options={
                'verbose_name': 'Live document',
                'verbose_name_plural': 'Live documents',
            },
            managers=[
                ('objects', aleksis.core.managers.PolymorphicCurrentSiteManager()),
            ],
        ),
    ]
