<?php

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

class CreateFavouritePatientsTable extends Migration
{
    public function up()
    {
        Schema::create('favourite_patients', function (Blueprint $table) {
            $table->id(); // Primary key: id
            $table->unsignedBigInteger('patient_id'); // Simplified patient_id column
            $table->unsignedBigInteger('hcp_id'); // Simplified hcp_id column
            $table->date('date'); // Date of the favorite action
            $table->softDeletes(); // Soft delete column
            $table->timestamps(); // Created at and updated at
        });
    }

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