<?php

use Spatie\LaravelSettings\Migrations\SettingsMigration;

return new class extends SettingsMigration
{
    public function up(): void
    {
        if (! $this->migrator->exists('general.attachments_url_prefix')) {
            $this->migrator->inGroup('general', function ($blueprint): void {
                $blueprint->add('attachments_url_prefix', env('ATTACHMENTS_URL_PREFIX', 'attachments'));
            });
        }
    }
};
