<?php

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

return new class extends Migration {
    public function up(): void {
        Schema::create('seccion1_datos_generales', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->unsignedBigInteger('form_id');
            // TODO: Reemplaza con los campos reales de tu Sección 1
            $table->string('representante_legal', 150)->nullable();
            $table->string('direccion', 200)->nullable();
            $table->string('telefono', 50)->nullable();
            $table->string('email', 150)->nullable();
            $table->timestamps();

            $table->foreign('form_id')->references('id')->on('formularios')->onDelete('cascade');
            $table->unique('form_id');
        });
    }
    public function down(): void { Schema::dropIfExists('seccion1_datos_generales'); }
};
