<?php

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

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        if (Schema::hasColumn('license_details', '1st_activation')) {
            Schema::table('license_details', function (Blueprint $table) {
                $table->renameColumn('1st_activation', 'first_activation');
            });
        }
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        if (Schema::hasColumn('license_details', 'first_activation')) {
            Schema::table('license_details', function (Blueprint $table) {
                $table->renameColumn('first_activation', '1st_activation');
            });
        }
    }
};
