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

Migración para telefonos

parent 93828a90
Loading
Loading
Loading
Loading
+38 −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('telefonos', function (Blueprint $table) {
            $table->id();
            $table->integer('prefijo')->nullable();
            $table->integer('lada')->nullable();
            $table->integer('numero')->nullable();
            $table->string('tipo')->nullable();
            $table->string('estatus')->nullable();
            $table->integer('ext')->nullable();
            $table->integer('id_radio')->nullable();
            $table->string('observaciones')->nullable();
            $table->unsignedBigInteger('contacto_id');
            $table->timestamps();

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

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