<?php

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

class CreateAddressdatatblTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('AddressDataTBL', function (Blueprint $table) {
            $table->id(); // Creates an auto-incrementing 'id' column.
            $table->integer('pin_code'); // Creates a 'pin_code' column with INT type.
            $table->text('district')->nullable(); // Creates a 'district' column with TEXT type, allows NULL values.
            $table->text('state')->nullable(); // Creates a 'state' column with TEXT type, allows NULL values.
            $table->timestamp('updated_at')->useCurrent(); // Creates an 'updated_at' column with current timestamp as default.
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('AddressDataTBL');
    }
}
