# -*- coding: utf-8 -*-
# Generated by Django 1.9.13 on 2017-08-02 07:29


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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('committee', '0001_initial'),
        ('person', '0001_initial'),
        ('bill', '0001_initial'),
    ]

    operations = [
        migrations.AddField(
            model_name='bill',
            name='committees',
            field=models.ManyToManyField(help_text=b'Committees to which the bill has been referred.', related_name='bills', to='committee.Committee'),
        ),
        migrations.AddField(
            model_name='bill',
            name='cosponsors',
            field=models.ManyToManyField(blank=True, help_text=b"The bill's cosponsors.", through='bill.Cosponsor', to='person.Person'),
        ),
        migrations.AddField(
            model_name='bill',
            name='sponsor',
            field=models.ForeignKey(blank=True, help_text=b'The primary sponsor of the bill.', null=True, on_delete=django.db.models.deletion.PROTECT, related_name='sponsored_bills', to='person.Person'),
        ),
        migrations.AddField(
            model_name='bill',
            name='sponsor_role',
            field=models.ForeignKey(blank=True, help_text=b'The role of the primary sponsor of the bill at the time the bill was introduced.', null=True, on_delete=django.db.models.deletion.PROTECT, to='person.PersonRole'),
        ),
        migrations.AddField(
            model_name='bill',
            name='terms',
            field=models.ManyToManyField(help_text=b'Subject areas associated with the bill.', related_name='bills', to='bill.BillTerm'),
        ),
        migrations.AddField(
            model_name='amendment',
            name='bill',
            field=models.ForeignKey(help_text=b'The bill the amendment amends.', on_delete=django.db.models.deletion.CASCADE, to='bill.Bill'),
        ),
        migrations.AddField(
            model_name='amendment',
            name='sponsor',
            field=models.ForeignKey(blank=True, help_text=b'The sponsor of the amendment.', null=True, on_delete=django.db.models.deletion.PROTECT, related_name='sponsored_amendments', to='person.Person'),
        ),
        migrations.AddField(
            model_name='amendment',
            name='sponsor_role',
            field=models.ForeignKey(blank=True, help_text=b'The role of the sponsor of the amendment at the time the amendment was offered.', null=True, on_delete=django.db.models.deletion.PROTECT, to='person.PersonRole'),
        ),
        migrations.AlterUniqueTogether(
            name='cosponsor',
            unique_together=set([('bill', 'person')]),
        ),
        migrations.AlterUniqueTogether(
            name='billtextcomparison',
            unique_together=set([('bill1', 'ver1', 'bill2', 'ver2')]),
        ),
        migrations.AlterUniqueTogether(
            name='billterm',
            unique_together=set([('name', 'term_type')]),
        ),
        migrations.AlterUniqueTogether(
            name='billlink',
            unique_together=set([('bill', 'url')]),
        ),
        migrations.AlterUniqueTogether(
            name='bill',
            unique_together=set([('congress', 'bill_type', 'number'), ('congress', 'sliplawpubpriv', 'sliplawnum')]),
        ),
        migrations.AlterUniqueTogether(
            name='amendment',
            unique_together=set([('congress', 'amendment_type', 'number'), ('bill', 'sequence')]),
        ),
    ]
