<?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_views', function (Blueprint $table) {
            $table->unsignedInteger('watched_seconds')->default(0)->after('country_name');
            $table->boolean('completed')->default(false)->after('watched_seconds');
        });
    }

    public function down(): void
    {
        Schema::table('video_views', function (Blueprint $table) {
            $table->dropColumn(['watched_seconds', 'completed']);
        });
    }
};
