# Generated by Django 2.2.6 on 2019-11-01 16:54

from django.db import migrations, models
import django.db.models.deletion
import markdownx.models
import mptt.fields
import tagulous.models.fields
import tagulous.models.models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Author',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(blank=True, max_length=50)),
                ('slug', models.CharField(blank=True, max_length=50)),
                ('institution', models.CharField(blank=True, max_length=150)),
                ('image', models.ImageField(blank=True, null=True, upload_to='')),
                ('url', models.URLField(blank=True)),
            ],
        ),
        migrations.CreateModel(
            name='TeamMember',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(blank=True, max_length=100)),
                ('slug', models.SlugField(blank=True, editable=False)),
                ('position', models.CharField(blank=True, max_length=250)),
                ('biography', markdownx.models.MarkdownxField(blank=True)),
                ('image', models.ImageField(blank=True, null=True, upload_to='')),
                ('website_url', models.CharField(blank=True, max_length=150)),
                ('twitter_handle', models.CharField(blank=True, max_length=150)),
                ('is_alumni', models.BooleanField(default=False)),
                ('visible', models.BooleanField(default=False)),
                ('ordering', models.IntegerField(default=0)),
            ],
            options={
                'ordering': ['ordering'],
            },
        ),
        migrations.CreateModel(
            name='ThingWithTopics',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=200)),
                ('image', models.ImageField(blank=True, null=True, upload_to='')),
                ('created_at', models.DateField(auto_now_add=True)),
                ('published_at', models.DateField(blank=True, null=True)),
                ('authors', models.ManyToManyField(blank=True, to='frontend.Author')),
                ('related', models.ManyToManyField(blank=True, related_name='_thingwithtopics_related_+', to='frontend.ThingWithTopics')),
            ],
            options={
                'ordering': ('-published_at',),
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Blog',
            fields=[
                ('thingwithtopics_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='frontend.ThingWithTopics')),
                ('body', markdownx.models.MarkdownxField(blank=True)),
            ],
            options={
                'abstract': False,
            },
            bases=('frontend.thingwithtopics',),
        ),
        migrations.CreateModel(
            name='Dataset',
            fields=[
                ('thingwithtopics_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='frontend.ThingWithTopics')),
                ('doi', models.CharField(blank=True, max_length=200, null=True, unique=True)),
                ('url', models.URLField(unique=True)),
            ],
            options={
                'abstract': False,
            },
            bases=('frontend.thingwithtopics', models.Model),
        ),
        migrations.CreateModel(
            name='Paper',
            fields=[
                ('thingwithtopics_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='frontend.ThingWithTopics')),
                ('doi', models.CharField(blank=True, max_length=200, null=True, unique=True)),
                ('url', models.URLField(unique=True)),
                ('description', models.CharField(blank=True, help_text='20 words max.', max_length=250)),
                ('abstract', markdownx.models.MarkdownxField(blank=True)),
                ('citation', models.CharField(max_length=200)),
            ],
            options={
                'abstract': False,
            },
            bases=('frontend.thingwithtopics', models.Model),
        ),
        migrations.CreateModel(
            name='Software',
            fields=[
                ('thingwithtopics_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='frontend.ThingWithTopics')),
                ('doi', models.CharField(blank=True, max_length=200, null=True, unique=True)),
                ('url', models.URLField(unique=True)),
            ],
            options={
                'abstract': False,
            },
            bases=('frontend.thingwithtopics', models.Model),
        ),
        migrations.CreateModel(
            name='Tool',
            fields=[
                ('thingwithtopics_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='frontend.ThingWithTopics')),
                ('doi', models.CharField(blank=True, max_length=200, null=True, unique=True)),
                ('url', models.URLField(unique=True)),
            ],
            options={
                'abstract': False,
            },
            bases=('frontend.thingwithtopics', models.Model),
        ),
        migrations.CreateModel(
            name='TopicTags',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255, unique=True)),
                ('slug', models.SlugField()),
                ('count', models.IntegerField(default=0, help_text='Internal counter of how many times this tag is in use')),
                ('protected', models.BooleanField(default=False, help_text='Will not be deleted when the count reaches 0')),
                ('path', models.TextField()),
                ('label', models.CharField(help_text='The name of the tag, without ancestors', max_length=255)),
                ('level', models.IntegerField(default=1, help_text='The level of the tag in the tree')),
                ('parent', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='children', to='frontend.TopicTags')),
            ],
            options={
                'ordering': ('name',),
                'abstract': False,
                'unique_together': {('slug', 'parent')},
            },
            bases=(tagulous.models.models.BaseTagTreeModel, models.Model),
        ),
        migrations.CreateModel(
            name='Topic',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=200)),
                ('image', models.ImageField(blank=True, null=True, upload_to='')),
                ('created_at', models.DateField(auto_now_add=True)),
                ('published_at', models.DateField(blank=True, null=True)),
                ('authors', models.ManyToManyField(blank=True, to='frontend.Author')),
                ('topic_tag', tagulous.models.fields.SingleTagField(_set_tag_meta=True, blank=True, force_lowercase=False, initial='"Health/Changing Behaviour", "Health/Data Science", "Science/Conflicts of Interest", "Science/Trial Reporting", Health/OpenPrescribing, Health/Policy, Health/RCTs, Health/Research, Health/Variation, Science/Policy, Science/RCTs, Science/Retractions, Science/TrialsTrackers', null=True, on_delete=django.db.models.deletion.CASCADE, space_delimiter=False, to='frontend.TopicTags', tree=True)),
            ],
            options={
                'ordering': ('-published_at',),
                'abstract': False,
            },
        ),
        migrations.AddField(
            model_name='thingwithtopics',
            name='topics',
            field=tagulous.models.fields.TagField(_set_tag_meta=True, blank=True, force_lowercase=False, help_text='Enter a comma-separated tag string', initial='"Health/Changing Behaviour", "Health/Data Science", "Science/Conflicts of Interest", "Science/Trial Reporting", Health/OpenPrescribing, Health/Policy, Health/RCTs, Health/Research, Health/Variation, Science/Policy, Science/RCTs, Science/Retractions, Science/TrialsTrackers', space_delimiter=False, to='frontend.TopicTags', tree=True),
        ),
        migrations.CreateModel(
            name='Page',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('slug', models.SlugField(blank=True, max_length=100)),
                ('url', models.CharField(blank=True, editable=False, max_length=100)),
                ('menu_title', models.CharField(blank=True, max_length=150)),
                ('show_in_menu', models.BooleanField(default=False)),
                ('meta_title', models.CharField(blank=True, max_length=150)),
                ('body', markdownx.models.MarkdownxField(blank=True, null=True)),
                ('lft', models.PositiveIntegerField(editable=False)),
                ('rght', models.PositiveIntegerField(editable=False)),
                ('tree_id', models.PositiveIntegerField(db_index=True, editable=False)),
                ('level', models.PositiveIntegerField(editable=False)),
                ('parent', mptt.fields.TreeForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='children', to='frontend.Page')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.AddField(
            model_name='author',
            name='topics',
            field=tagulous.models.fields.TagField(_set_tag_meta=True, blank=True, force_lowercase=False, help_text='Enter a comma-separated tag string', initial='"Health/Changing Behaviour", "Health/Data Science", "Science/Conflicts of Interest", "Science/Trial Reporting", Health/OpenPrescribing, Health/Policy, Health/RCTs, Health/Research, Health/Variation, Science/Policy, Science/RCTs, Science/Retractions, Science/TrialsTrackers', space_delimiter=False, to='frontend.TopicTags', tree=True),
        ),
    ]
