<?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('lesen_penjajas', function (Blueprint $table) {
            $table->integer('jenis_jualan_id')->after('dt_lesen_dikeluarkan')->nullable();
            $table->dropColumn('jenis_perniagaan');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        //
        Schema::table('lesen_penjajas', function (Blueprint $table) {
            // Change the 'age' column from string to integer, and keep it nullable
            $table->string('jenis_perniagaan')->nullable();
            $table->dropColumn('jenis_jualan_id');
        });
    }
};
