<?php

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

return new class extends Migration {
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::table('noc', function (Blueprint $table) {
            // Field untuk informasi memo penyelesaian
            $table->string('memo_penyelesaian_number')->nullable()->after('memo_penyelesaian');
            $table->date('memo_penyelesaian_date')->nullable()->after('memo_penyelesaian_number');
            $table->date('memo_penyelesaian_payment_date')->nullable()->after('memo_penyelesaian_date');
            $table->timestamp('memo_penyelesaian_created_at')->nullable()->after('memo_penyelesaian_date');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('noc', function (Blueprint $table) {
            $table->dropColumn([
                'memo_penyelesaian_number',
                'memo_penyelesaian_date',
                'memo_penyelesaian_payment_date',
                'memo_penyelesaian_created_at'
            ]);
        });
    }
};
