# Generated by Django 4.2.13 on 2024-05-30 07:38

from urllib.parse import urljoin

import private_storage.fields
import private_storage.storage.files
from django.db import migrations

import openwisp_firmware_upgrader.base.models

from ..settings import FIRMWARE_API_BASEURL, IMAGE_URL_PATH


class Migration(migrations.Migration):
    dependencies = [
        ("firmware_upgrader", "0009_upgrade_options"),
    ]

    operations = [
        migrations.AlterField(
            model_name="firmwareimage",
            name="file",
            field=private_storage.fields.PrivateFileField(
                max_length=255,
                storage=private_storage.storage.files.PrivateFileSystemStorage(
                    base_url=urljoin(FIRMWARE_API_BASEURL, IMAGE_URL_PATH),
                ),
                upload_to=openwisp_firmware_upgrader.base.models.get_build_directory,
                verbose_name="File",
            ),
        ),
    ]
