<?php

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

return new class extends Migration
{
    public function up()
    {
        Schema::table('sales_dashboard', function (Blueprint $table) {
            // Change achiv column from decimal(5, 2) to decimal(12, 2) to accommodate larger values
            $table->decimal('achiv', 12, 2)->nullable()->change();
        });
    }

    public function down()
    {
        Schema::table('sales_dashboard', function (Blueprint $table) {
            $table->decimal('achiv', 5, 2)->nullable()->change();
        });
    }
};
