# Generated by Django 3.0.5 on 2020-06-13 08:41

import autoslug.fields
from django.db import migrations, models
import django.db.models.deletion
import modelcluster.fields
import wagtail.contrib.routable_page.models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('wagtailimages', '0001_squashed_0021'),
        ('wagtailcore', '0045_assign_unlock_grouppagepermission'),
    ]

    operations = [
        migrations.CreateModel(
            name='Cindex',
            fields=[
                ('cindex_id', models.IntegerField(primary_key=True, serialize=False)),
                ('pub_date', models.PositiveSmallIntegerField(blank=True, null=True)),
                ('range_date', models.TextField(blank=True, null=True)),
                ('custom_title', models.TextField(blank=True, null=True)),
                ('about', models.TextField(blank=True, null=True)),
                ('author_founder', models.TextField(blank=True, max_length=500, null=True)),
                ('external_link', models.TextField(blank=True, null=True)),
                ('location', models.TextField(blank=True, null=True)),
                ('note', models.TextField(blank=True, null=True)),
                ('image', models.TextField(blank=True, null=True)),
            ],
            options={
                'db_table': 'cindex',
                'managed': False,
            },
        ),
        migrations.CreateModel(
            name='IndexCategory',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255)),
                ('slug', autoslug.fields.AutoSlugField(allow_unicode=True, editable=False, populate_from='name')),
            ],
            options={
                'verbose_name': 'Index Category',
                'verbose_name_plural': 'Index Categories',
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='IndexCurators',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255, verbose_name='Name/Organization')),
                ('slug', autoslug.fields.AutoSlugField(allow_unicode=True, editable=False, populate_from='name')),
            ],
            options={
                'verbose_name': 'Curator',
                'verbose_name_plural': 'Curators',
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='IndexDetailPage',
            fields=[
                ('page_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='wagtailcore.Page')),
                ('custom_title', autoslug.fields.AutoSlugField(editable=False, populate_from='title')),
                ('about', models.TextField(blank=True, null=True)),
                ('pub_date', models.PositiveSmallIntegerField(blank=True, null=True, verbose_name='Date Published / Created')),
                ('range_date', models.PositiveSmallIntegerField(blank=True, null=True, verbose_name='Date Range')),
                ('author_founder', models.CharField(blank=True, max_length=255, null=True, verbose_name='Author/Founder')),
                ('contributed_by', models.CharField(blank=True, max_length=255, null=True, verbose_name='Contributed By')),
                ('external_link', models.URLField(blank=True, null=True)),
                ('autoincrement_num', models.PositiveSmallIntegerField(blank=True, null=True)),
                ('location', models.CharField(blank=True, max_length=255, null=True, verbose_name='location')),
                ('categories', modelcluster.fields.ParentalManyToManyField(blank=True, to='index.IndexCategory')),
            ],
            options={
                'abstract': False,
            },
            bases=('wagtailcore.page',),
        ),
        migrations.CreateModel(
            name='IndexPage',
            fields=[
                ('page_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='wagtailcore.Page')),
                ('custom_title', models.CharField(help_text='Overwrites default title', max_length=100)),
            ],
            options={
                'abstract': False,
            },
            bases=(wagtail.contrib.routable_page.models.RoutablePageMixin, 'wagtailcore.page'),
        ),
        migrations.CreateModel(
            name='ImagesOrderable',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('sort_order', models.IntegerField(blank=True, editable=False, null=True)),
                ('caption', models.CharField(blank=True, max_length=255, null=True, verbose_name='caption')),
                ('images', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='wagtailimages.Image')),
                ('page', modelcluster.fields.ParentalKey(on_delete=django.db.models.deletion.CASCADE, related_name='images_list', to='index.IndexDetailPage')),
            ],
            options={
                'ordering': ['sort_order'],
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='CollectionsOrderable',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('sort_order', models.IntegerField(blank=True, editable=False, null=True)),
                ('curators', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, related_name='c_list', to='index.IndexCurators')),
                ('page', modelcluster.fields.ParentalKey(on_delete=django.db.models.deletion.CASCADE, related_name='collections_list', to='index.IndexDetailPage')),
            ],
            options={
                'ordering': ['sort_order'],
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='IndexInternalLinks',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('link_copy', models.TextField(blank=True, null=True)),
                ('link_url', models.CharField(blank=True, max_length=500, null=True)),
                ('link_page', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='+', to='wagtailcore.Page')),
                ('page', modelcluster.fields.ParentalKey(on_delete=django.db.models.deletion.CASCADE, related_name='internal_links', to='index.IndexDetailPage')),
            ],
            options={
                'unique_together': {('page', 'link_page')},
            },
        ),
    ]
