# -*- coding: utf-8 -*-
# Generated by Django 1.9.5 on 2016-06-21 08:32
from __future__ import unicode_literals

import catalogue.shared.functions
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    dependencies = [
        ('commentaries', '0003_text_attachments'),
    ]

    operations = [
        migrations.CreateModel(
            name='Upload',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('modified', models.DateTimeField(auto_now=True)),
                ('attachment', models.FileField(blank=True, upload_to=catalogue.shared.functions.attachment_id_path)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.RemoveField(
            model_name='text',
            name='attachments',
        ),
        migrations.AddField(
            model_name='upload',
            name='attached_to',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='commentaries.Text'),
        ),
    ]
