# -*- coding: utf-8 -*-
# Generated by Django 1.11.1 on 2017-05-14 14:14
from __future__ import unicode_literals

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')),
                ('first_name', models.CharField(max_length=256)),
                ('last_name', models.CharField(max_length=256)),
            ],
        ),
        migrations.CreateModel(
            name='Circuit',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('number', models.IntegerField()),
                ('eligible', models.IntegerField(default=0)),
                ('ballots_given_out', models.IntegerField(default=0)),
                ('ballots_cast', models.IntegerField(default=0)),
                ('ballots_invalid', models.IntegerField(default=0)),
                ('ballots_valid', models.IntegerField(default=0)),
                ('document', models.FileField(default=None, null=True, upload_to='documents')),
            ],
        ),
        migrations.CreateModel(
            name='District',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('number', models.IntegerField(unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='Gmina',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('code', models.IntegerField(unique=True)),
                ('name', models.CharField(max_length=256)),
            ],
        ),
        migrations.CreateModel(
            name='Voivodeship',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=256, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='Votes',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('number', models.IntegerField()),
                ('candidate', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='election.Candidate')),
                ('circuit', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='election.Circuit')),
            ],
        ),
        migrations.AddField(
            model_name='district',
            name='voivodeship',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='election.Voivodeship'),
        ),
        migrations.AddField(
            model_name='circuit',
            name='district',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='election.District'),
        ),
        migrations.AddField(
            model_name='circuit',
            name='gmina',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='election.Gmina'),
        ),
        migrations.AlterUniqueTogether(
            name='candidate',
            unique_together=set([('first_name', 'last_name')]),
        ),
        migrations.AlterUniqueTogether(
            name='votes',
            unique_together=set([('candidate', 'circuit')]),
        ),
        migrations.AlterUniqueTogether(
            name='circuit',
            unique_together=set([('number', 'district', 'gmina')]),
        ),
    ]

0550d3cf8082febb6d45c0ee2bc08673af1498e0
<mask token>

<mask token>


class Migration(migrations.Migration):
    <mask token>
    <mask token>
    <mask token>

<mask token>


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')), ('first_name', models.CharField(
        max_length=256)), ('last_name', models.CharField(max_length=256))]),
        migrations.CreateModel(name='Circuit', fields=[('id', models.
        AutoField(auto_created=True, primary_key=True, serialize=False,
        verbose_name='ID')), ('number', models.IntegerField()), ('eligible',
        models.IntegerField(default=0)), ('ballots_given_out', models.
        IntegerField(default=0)), ('ballots_cast', models.IntegerField(
        default=0)), ('ballots_invalid', models.IntegerField(default=0)), (
        'ballots_valid', models.IntegerField(default=0)), ('document',
        models.FileField(default=None, null=True, upload_to='documents'))]),
        migrations.CreateModel(name='District', fields=[('id', models.
        AutoField(auto_created=True, primary_key=True, serialize=False,
        verbose_name='ID')), ('number', models.IntegerField(unique=True))]),
        migrations.CreateModel(name='Gmina', fields=[('id', models.
        AutoField(auto_created=True, primary_key=True, serialize=False,
        verbose_name='ID')), ('code', models.IntegerField(unique=True)), (
        'name', models.CharField(max_length=256))]), migrations.CreateModel
        (name='Voivodeship', fields=[('id', models.AutoField(auto_created=
        True, primary_key=True, serialize=False, verbose_name='ID')), (
        'name', models.CharField(max_length=256, unique=True))]),
        migrations.CreateModel(name='Votes', fields=[('id', models.
        AutoField(auto_created=True, primary_key=True, serialize=False,
        verbose_name='ID')), ('number', models.IntegerField()), (
        'candidate', models.ForeignKey(on_delete=django.db.models.deletion.
        CASCADE, to='election.Candidate')), ('circuit', models.ForeignKey(
        on_delete=django.db.models.deletion.CASCADE, to='election.Circuit')
        )]), migrations.AddField(model_name='district', name='voivodeship',
        field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
        to='election.Voivodeship')), migrations.AddField(model_name=
        'circuit', name='district', field=models.ForeignKey(on_delete=
        django.db.models.deletion.CASCADE, to='election.District')),
        migrations.AddField(model_name='circuit', name='gmina', field=
        models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=
        'election.Gmina')), migrations.AlterUniqueTogether(name='candidate',
        unique_together=set([('first_name', 'last_name')])), migrations.
        AlterUniqueTogether(name='votes', unique_together=set([('candidate',
        'circuit')])), migrations.AlterUniqueTogether(name='circuit',
        unique_together=set([('number', 'district', 'gmina')]))]

from __future__ import unicode_literals
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')), ('first_name', models.CharField(
        max_length=256)), ('last_name', models.CharField(max_length=256))]),
        migrations.CreateModel(name='Circuit', fields=[('id', models.
        AutoField(auto_created=True, primary_key=True, serialize=False,
        verbose_name='ID')), ('number', models.IntegerField()), ('eligible',
        models.IntegerField(default=0)), ('ballots_given_out', models.
        IntegerField(default=0)), ('ballots_cast', models.IntegerField(
        default=0)), ('ballots_invalid', models.IntegerField(default=0)), (
        'ballots_valid', models.IntegerField(default=0)), ('document',
        models.FileField(default=None, null=True, upload_to='documents'))]),
        migrations.CreateModel(name='District', fields=[('id', models.
        AutoField(auto_created=True, primary_key=True, serialize=False,
        verbose_name='ID')), ('number', models.IntegerField(unique=True))]),
        migrations.CreateModel(name='Gmina', fields=[('id', models.
        AutoField(auto_created=True, primary_key=True, serialize=False,
        verbose_name='ID')), ('code', models.IntegerField(unique=True)), (
        'name', models.CharField(max_length=256))]), migrations.CreateModel
        (name='Voivodeship', fields=[('id', models.AutoField(auto_created=
        True, primary_key=True, serialize=False, verbose_name='ID')), (
        'name', models.CharField(max_length=256, unique=True))]),
        migrations.CreateModel(name='Votes', fields=[('id', models.
        AutoField(auto_created=True, primary_key=True, serialize=False,
        verbose_name='ID')), ('number', models.IntegerField()), (
        'candidate', models.ForeignKey(on_delete=django.db.models.deletion.
        CASCADE, to='election.Candidate')), ('circuit', models.ForeignKey(
        on_delete=django.db.models.deletion.CASCADE, to='election.Circuit')
        )]), migrations.AddField(model_name='district', name='voivodeship',
        field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
        to='election.Voivodeship')), migrations.AddField(model_name=
        'circuit', name='district', field=models.ForeignKey(on_delete=
        django.db.models.deletion.CASCADE, to='election.District')),
        migrations.AddField(model_name='circuit', name='gmina', field=
        models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=
        'election.Gmina')), migrations.AlterUniqueTogether(name='candidate',
        unique_together=set([('first_name', 'last_name')])), migrations.
        AlterUniqueTogether(name='votes', unique_together=set([('candidate',
        'circuit')])), migrations.AlterUniqueTogether(name='circuit',
        unique_together=set([('number', 'district', 'gmina')]))]

# -*- coding: utf-8 -*-
# Generated by Django 1.11.1 on 2017-05-14 14:14
from __future__ import unicode_literals

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')),
                ('first_name', models.CharField(max_length=256)),
                ('last_name', models.CharField(max_length=256)),
            ],
        ),
        migrations.CreateModel(
            name='Circuit',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('number', models.IntegerField()),
                ('eligible', models.IntegerField(default=0)),
                ('ballots_given_out', models.IntegerField(default=0)),
                ('ballots_cast', models.IntegerField(default=0)),
                ('ballots_invalid', models.IntegerField(default=0)),
                ('ballots_valid', models.IntegerField(default=0)),
                ('document', models.FileField(default=None, null=True, upload_to='documents')),
            ],
        ),
        migrations.CreateModel(
            name='District',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('number', models.IntegerField(unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='Gmina',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('code', models.IntegerField(unique=True)),
                ('name', models.CharField(max_length=256)),
            ],
        ),
        migrations.CreateModel(
            name='Voivodeship',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=256, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='Votes',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('number', models.IntegerField()),
                ('candidate', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='election.Candidate')),
                ('circuit', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='election.Circuit')),
            ],
        ),
        migrations.AddField(
            model_name='district',
            name='voivodeship',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='election.Voivodeship'),
        ),
        migrations.AddField(
            model_name='circuit',
            name='district',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='election.District'),
        ),
        migrations.AddField(
            model_name='circuit',
            name='gmina',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='election.Gmina'),
        ),
        migrations.AlterUniqueTogether(
            name='candidate',
            unique_together=set([('first_name', 'last_name')]),
        ),
        migrations.AlterUniqueTogether(
            name='votes',
            unique_together=set([('candidate', 'circuit')]),
        ),
        migrations.AlterUniqueTogether(
            name='circuit',
            unique_together=set([('number', 'district', 'gmina')]),
        ),
    ]
