# Generated by Django 2.2 on 2019-04-16 21:07

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Candidate',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('uid', models.CharField(max_length=250, unique=True)),
                ('fec_uid', models.CharField(blank=True, max_length=50, null=True, unique=True)),
                ('name', models.CharField(max_length=100)),
                ('headshot', models.URLField(blank=True, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100, unique=True)),
                ('slug', models.SlugField(unique=True)),
                ('summary', models.TextField(blank=True, null=True)),
                ('icon', models.TextField(blank=True, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Issue',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(blank=True, max_length=100, null=True, unique=True)),
                ('slug', models.SlugField(unique=True)),
                ('summary', models.TextField(blank=True, null=True)),
                ('order', models.IntegerField()),
                ('category', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='issuestracker.Category')),
            ],
        ),
        migrations.CreateModel(
            name='Update',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('text', models.TextField()),
                ('created_on', models.DateField(auto_now_add=True)),
                ('issue', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='issuestracker.Issue')),
            ],
            options={
                'ordering': ['-created_on'],
            },
        ),
        migrations.CreateModel(
            name='Story',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('headline', models.CharField(max_length=200)),
                ('link', models.URLField()),
                ('order', models.IntegerField()),
                ('issue', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='issuestracker.Issue')),
            ],
            options={
                'ordering': ['order'],
            },
        ),
        migrations.CreateModel(
            name='Position',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200)),
                ('explanation', models.TextField(blank=True, null=True)),
                ('order', models.IntegerField()),
                ('candidates', models.ManyToManyField(to='issuestracker.Candidate')),
                ('issue', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='issuestracker.Issue')),
            ],
            options={
                'ordering': ['order'],
                'unique_together': {('name', 'issue')},
            },
        ),
        migrations.CreateModel(
            name='Faq',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('question', models.CharField(max_length=500)),
                ('answer', models.TextField(blank=True, null=True)),
                ('order', models.IntegerField()),
                ('issue', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='issuestracker.Issue')),
            ],
            options={
                'ordering': ['order'],
                'unique_together': {('question', 'issue')},
            },
        ),
    ]
