<?php

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

class CreateClientesTable extends Migration
{
    public function up()
    {
        Schema::create('clientes', function (Blueprint $table) {
            $table->id(); // Campo id autoincremental
            $table->string('rut')->nullable(); // RUT opcional
            $table->string('nombre'); // Nombre del cliente (también será la cuenta de usuario)
            $table->string('correo')->nullable(); // Correo opcional
            $table->string('fono')->nullable(); // Teléfono opcional
            $table->timestamps(); // Campos created_at y updated_at
        });
    }

    public function down()
    {
        Schema::dropIfExists('clientes');
    }
}

