# -*- coding: utf-8 -*-
# Generated by Django 1.11.1 on 2019-04-04 20:25
from __future__ import unicode_literals

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import imagekit.models.fields
import storages.backends.s3boto3

class Migration(migrations.Migration):

    dependencies = [
        ('contenttypes', '0002_remove_content_type_name'),
        ('auth', '0008_alter_user_username_max_length'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('dashboard', '0063_merge_20190313_1554'),
    ]

    operations = [
        migrations.CreateModel(
            name='Photo',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date_added', models.DateTimeField(auto_now_add=True)),
                ('caption', models.CharField(blank=True, max_length=60)),
                ('image_width', models.PositiveIntegerField()),
                ('image_height', models.PositiveIntegerField()),
                ('image', models.ImageField(height_field='image_height', storage=storages.backends.s3boto3.S3Boto3Storage(bucket=settings.AWS_SECURE_STORAGE_BUCKET_NAME), upload_to='images', width_field='image_width')),
                ('thumbnail', imagekit.models.fields.ProcessedImageField(storage=storages.backends.s3boto3.S3Boto3Storage(bucket=settings.AWS_SECURE_STORAGE_BUCKET_NAME), upload_to='image_thumbnails')),
                ('group', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='auth.Group')),
                ('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='PhotoCollectionComponent',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('object_id', models.PositiveIntegerField()),
                ('ordering_index', models.PositiveIntegerField()),
                ('content_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='contenttypes.ContentType')),
                ('group', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='auth.Group')),
                ('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='PhotoCollectionPhoto',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ordering_index', models.PositiveIntegerField()),
                ('photo', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='dashboard.Photo')),
                ('photo_collection', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='photo_collection_photos', to='dashboard.PhotoCollectionComponent')),
            ],
        ),
    ]
