# Generated by Django 2.1.4 on 2018-12-19 11:15

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import wagtail.core.models
import wagtail.search.index


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('wagtailcore', '0040_page_draft_title'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Reference',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('slug', models.CharField(help_text='A short key to cite the reference by. Determined from the BibTeX entry key. Must be unique.', max_length=255, unique=True, verbose_name='slug')),
                ('bibtex', models.TextField(help_text='The reference, in bibtex format.')),
                ('bibtype', models.CharField(default='article', help_text='The entry type, detected from the BibTeX entry.', max_length=255, verbose_name='Bibliography entry type')),
                ('created_at', models.DateTimeField(auto_now_add=True, db_index=True, verbose_name='created at')),
                ('collection', models.ForeignKey(default=wagtail.core.models.get_root_collection_id, on_delete=django.db.models.deletion.CASCADE, related_name='+', to='wagtailcore.Collection', verbose_name='collection')),
                ('created_by_user', models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL, verbose_name='created by user')),
            ],
            options={
                'verbose_name': 'BibTeX Reference',
                'verbose_name_plural': 'BibTeX References',
            },
            bases=(wagtail.search.index.Indexed, models.Model),
        ),
    ]
