# Generated by Django 2.0.7 on 2018-07-21 13:17

from django.db import migrations, models
import django.db.models.deletion
import funkwhale_api.common.utils
import funkwhale_api.common.validators
import versatileimagefield.fields


class Migration(migrations.Migration):

    dependencies = [
        ("federation", "0006_auto_20180521_1702"),
        ("users", "0010_user_avatar"),
    ]

    operations = [
        migrations.AddField(
            model_name="user",
            name="actor",
            field=models.OneToOneField(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                related_name="user",
                to="federation.Actor",
            ),
        ),
        migrations.AlterField(
            model_name="user",
            name="avatar",
            field=versatileimagefield.fields.VersatileImageField(
                blank=True,
                max_length=150,
                null=True,
                upload_to=funkwhale_api.common.utils.ChunkedPath(
                    "users/avatars", preserve_file_name=False
                ),
                validators=[
                    funkwhale_api.common.validators.ImageDimensionsValidator(
                        min_height=50, min_width=50
                    ),
                    funkwhale_api.common.validators.FileValidator(
                        allowed_extensions=["png", "jpg", "jpeg", "gif"],
                        max_size=2097152,
                    ),
                ],
            ),
        ),
    ]
