<?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('users', function (Blueprint $table) {
            // Tambahkan 3 kolom baru setelah kolom 'password'
            $table->string('jenis_kelamin', 15)->nullable()->after('password');
            $table->float('berat_badan')->nullable()->after('jenis_kelamin');
            $table->float('tinggi_badan')->nullable()->after('berat_badan');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('users', function (Blueprint $table) {
            // Hapus kolom jika kita melakukan rollback
            $table->dropColumn(['jenis_kelamin', 'berat_badan', 'tinggi_badan']);
        });
    }
};
