# -*- coding: utf-8 -*-
# Generated by Django 1.11.12 on 2018-04-14 15:27
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    dependencies = [
        ('bpp', '0121_rekord_ostatnio_zmieniony_dla'),
    ]

    operations = [
        migrations.CreateModel(
            name='Autor_Dyscyplina',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('rok', models.PositiveSmallIntegerField()),
                ('autor', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bpp.Autor')),
            ],
        ),
        migrations.CreateModel(
            name='Dyscyplina_Naukowa',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nazwa', models.CharField(max_length=200)),
                ('widoczna', models.BooleanField(default=True)),
                ('lft', models.PositiveIntegerField(db_index=True, editable=False)),
                ('rght', models.PositiveIntegerField(db_index=True, editable=False)),
                ('tree_id', models.PositiveIntegerField(db_index=True, editable=False)),
                ('level', models.PositiveIntegerField(db_index=True, editable=False)),
                ('dyscyplina_nadrzedna', mptt.fields.TreeForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='subdyscypliny', to='bpp.Dyscyplina_Naukowa')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.AddField(
            model_name='autor_dyscyplina',
            name='dyscyplina',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bpp.Dyscyplina_Naukowa'),
        ),
    ]
