<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
use App\Models\SiteSetting;

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        // Add storage_driver setting
        SiteSetting::create([
            'key' => 'storage_driver',
            'value' => 'local', // Default to local storage
            'type' => 'text',
            'group' => 'system',
            'description' => 'Storage driver for images (cloudinary or local)'
        ]);
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        SiteSetting::where('key', 'storage_driver')->delete();
    }
};
