# Generated by Django 2.2 on 2020-04-16 19:12

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('contenttypes', '0002_remove_content_type_name'),
    ]

    operations = [
        migrations.CreateModel(
            name='Media',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('title', models.CharField(max_length=255)),
                ('type', models.CharField(choices=[('image', 'Image'), ('video', 'Video'), ('document', 'Document'), ('other', 'Other')], default='other', max_length=31)),
                ('position', models.CharField(choices=[('avatar', 'Avatar'), ('cover', 'Cover'), ('attachment', 'Attachment')], default='attachment', max_length=31)),
                ('file', models.FileField(upload_to=Media.upload_to_media)),
                ('thumbnail', models.ImageField(null=True, upload_to='')),
                ('mime_type', models.CharField(max_length=127)),
                ('size', models.BigIntegerField(null=True)),
                ('group', models.CharField(blank=True, max_length=255, null=True)),
                ('object_id', models.IntegerField()),
                ('content_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='contenttypes.ContentType')),
            ],
            options={
                'verbose_name': 'Media',
                'verbose_name_plural': 'Media',
                'db_table': 'media',
            },
        ),
        migrations.AddIndex(
            model_name='media',
            index=models.Index(fields=['type', 'position'], name='media_type_266413_idx'),
        ),
    ]
