<?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('patient_hcp_name', function (Blueprint $table) {
            $table->id('provider_id'); 
            $table->unsignedBigInteger('patient_id'); 
            $table->string('provider_name', 100)->nullable(); 
            $table->string('provider_contact', 100)->nullable(); 
            $table->string('provider_specialty', 100)->nullable(); 
            
            $table->foreign('patient_id')->references('patient_id')->on('patient')->onUpdate('no action')->onDelete('no action');
        });
    }

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