# Generated by Django 3.2.13 on 2023-05-11 20:06

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

import vbv_lernwelt.files.utils


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name="UploadFile",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "file",
                    models.FileField(
                        blank=True,
                        null=True,
                        upload_to=vbv_lernwelt.files.utils.file_generate_upload_path,
                    ),
                ),
                ("original_file_name", models.TextField()),
                ("file_name", models.CharField(max_length=255, unique=True)),
                ("file_type", models.CharField(max_length=255)),
                ("upload_finished_at", models.DateTimeField(blank=True, null=True)),
                (
                    "uploaded_by",
                    models.ForeignKey(
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        to=settings.AUTH_USER_MODEL,
                    ),
                ),
            ],
        ),
    ]
