# Generated by Django 2.2.6 on 2019-11-14 20:42

import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models

import thunderstore.repository.models
import thunderstore.utils.makemigrations


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ("repository", "0017_organize_storage"),
    ]

    operations = [
        migrations.AlterField(
            model_name="packageversion",
            name="file",
            field=models.FileField(
                storage=thunderstore.utils.makemigrations.StubStorage(),
                upload_to=thunderstore.repository.models.get_version_zip_filepath,
            ),
        ),
        migrations.CreateModel(
            name="DiscordUserBotPermission",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("label", models.CharField(max_length=64)),
                ("discord_user_id", models.CharField(max_length=64)),
                ("can_deprecate", models.BooleanField(default=False)),
                (
                    "thunderstore_user",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        to=settings.AUTH_USER_MODEL,
                    ),
                ),
            ],
            options={
                "verbose_name": "Discord User Permissions",
                "verbose_name_plural": "Discord User Permissions",
                "unique_together": {("thunderstore_user", "discord_user_id")},
            },
        ),
    ]
