<?php

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

class CreateKeluhanTindakansTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('keluhan_tindakans', function (Blueprint $table) {
            $table->id();
            $table->unsignedBigInteger("id_pasien")->nullable();
            $table->foreign("id_pasien")->references("id")->on("pasiens");
            $table->text('keluhan');
            $table->text('tindakan');
            $table->timestamps();
        });
    }

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