# -*- coding: utf-8 -*-
# Generated by Django 1.10.7 on 2017-07-19 23:57
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    dependencies = [
        ('contenttypes', '0002_remove_content_type_name'),
        ('bpp', '0096_adnotacje_not_null'),
    ]

    operations = [
        migrations.CreateModel(
            name='Nagroda',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('object_id', models.PositiveIntegerField()),
                ('rok_przyznania', models.PositiveIntegerField()),
                ('uzasadnienie', models.CharField(blank=True, default='', max_length=512)),
                ('adnotacja', models.CharField(blank=True, default='', max_length=100)),
                ('content_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='contenttypes.ContentType')),
            ],
            options={
                'verbose_name': 'nagroda',
                'verbose_name_plural': 'nagrody',
            },
        ),
        migrations.CreateModel(
            name='OrganPrzyznajacyNagrody',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nazwa', models.CharField(max_length=512, unique=True)),
                ('skrot', models.CharField(max_length=128, unique=True)),
            ],
            options={
                'verbose_name': 'Organ przyznający nagrodę',
                'verbose_name_plural': 'Organy przyznające nagrody',
            },
        ),
        migrations.AddField(
            model_name='nagroda',
            name='organ_przyznajacy',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bpp.OrganPrzyznajacyNagrody'),
        ),
        migrations.AlterUniqueTogether(
            name='nagroda',
            unique_together=set([('content_type', 'object_id', 'organ_przyznajacy', 'rok_przyznania')]),
        ),
    ]
