# -*- coding: utf-8 -*-
# Generated by Django 1.11.3 on 2017-09-08 07:03
from __future__ import unicode_literals

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django_extensions.db.fields


class Migration(migrations.Migration):

    dependencies = [
        ('trainings', '0046_training_activity_description_nullable'),
        ('sync', '0003_add_index_on_update_synchornized'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('media', '0002_pdfmedia_file_hash'),
    ]

    operations = [
        migrations.CreateModel(
            name='Note',
            fields=[
                ('id', django_extensions.db.fields.UUIDField(blank=True, editable=False, primary_key=True, serialize=False)),
                ('is_deleted', models.BooleanField(default=False)),
                ('update_locally', models.BooleanField(default=False)),
                ('content', models.TextField(verbose_name='Content')),
                ('presentation_page', models.PositiveSmallIntegerField(blank=True, null=True, verbose_name='Presentation page')),
                ('first_update', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='media_note_by_first', to='sync.Update')),
                ('last_update', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='media_note_by_last', to='sync.Update')),
                ('presentation', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='notes', to='media.Presentation', verbose_name='Presentation')),
                ('training_session', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='notes', to='trainings.TrainingSession', verbose_name='Training session')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='notes', to=settings.AUTH_USER_MODEL, verbose_name='User')),
            ],
        ),
        migrations.AlterUniqueTogether(
            name='note',
            unique_together=set([('training_session', 'user', 'presentation', 'presentation_page')]),
        ),
    ]
