Commit ee7f7e96 authored by Alfonso Rafael Solis Rangel's avatar Alfonso Rafael Solis Rangel
Browse files

Migracion de correos electronicos

parent 31930cb8
Loading
Loading
Loading
Loading
+32 −0
Original line number Diff line number Diff line
<?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::create('correo_contactos', function (Blueprint $table) {
            $table->id();
            $table->string('correo_electronico')->nullable();
            $table->string('tipo_correo_electronico')->nullable();
            $table->unsignedBigInteger('contacto_id');
            $table->timestamps();

            $table->foreign('contacto_id')->references('id')->on('contactos')->onDelete('cascade')->onUpdate('cascade');
        });
    }

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