<?php

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

class Pemeriksaan extends Migration
{
  /**
   * Run the migrations.
   *
   * @return void
   */
  public function up()
  {
    Schema::create('pemeriksaan', function (Blueprint $table) {
      $table->integerIncrements('p_id');
      $table->integer('dp_id')->unsigned();

      $table->text('p_alergi');
      $table->text('p_anamnesa');
      $table->text('p_pemeriksaan_fisik');
      $table->string('p_status', 64);


      $table->timestamp('p_created_at')->useCurrent();
      $table->timestamp('p_updated_at')->nullable();
      $table->timestamp('p_deleted_at')->nullable();

      $table->foreign('dp_id')->references('dp_id')->on('data_pasien');
    });
  }

  /**
   * Reverse the migrations.
   *
   * @return void
   */
  public function down()
  {
    //
  }
}
