<?php

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

return new class extends Migration
{
    /**
     * Run the migrations.
     */
  // 2026_03_02_030318_remove_unique_active_treatment_from_dokter_pasien.php

public function up()
{
    Schema::table('dokter_pasien', function (Blueprint $table) {
        $table->dropUnique('unique_active_treatment'); // ← nama yang benar
    });
}

public function down()
{
    Schema::table('dokter_pasien', function (Blueprint $table) {
        $table->unique(['dokter_id', 'pasien_id', 'status_penanganan'], 'unique_active_treatment');
    });
}
};
