<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    public function up(): void
    {
        Schema::table('video_downloads', function (Blueprint $table) {
            $table->string('user_agent', 512)->nullable()->after('country_name');
        });

        Schema::table('share_accesses', function (Blueprint $table) {
            $table->string('user_agent', 512)->nullable()->after('country_name');
        });
    }

    public function down(): void
    {
        Schema::table('video_downloads', function (Blueprint $table) {
            $table->dropColumn('user_agent');
        });
        Schema::table('share_accesses', function (Blueprint $table) {
            $table->dropColumn('user_agent');
        });
    }
};
