# Generated by Django 2.2.4 on 2019-08-21 10:35

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


class Migration(migrations.Migration):

    dependencies = [
        ('contenttypes', '0002_remove_content_type_name'),
        ('openbook_posts', '0043_post_modified'),
    ]

    operations = [
        migrations.AddField(
            model_name='post',
            name='media_height',
            field=models.PositiveSmallIntegerField(null=True, verbose_name='media height'),
        ),
        migrations.AddField(
            model_name='post',
            name='media_width',
            field=models.PositiveSmallIntegerField(null=True, verbose_name='media height'),
        ),
        migrations.CreateModel(
            name='PostMedia',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('position', positions.fields.PositionField(default=-1)),
                ('type', models.CharField(choices=[('V', 'Video'), ('P', 'Photo')], max_length=5)),
                ('object_id', models.PositiveIntegerField()),
                ('content_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='contenttypes.ContentType')),
                ('post', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='media', to='openbook_posts.Post')),
            ],
        ),
    ]
