<?php

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

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

            $table->string('dp_no_rm', 32);
            $table->string('dp_no_ktp', 32);
            $table->string('dp_no_bpjs', 32);
            $table->string('dp_nama', 128);
            $table->string('dp_jenis_kelamin', 32);
            $table->date('dp_tgl_lahir');
            $table->text('dp_alamat');
            $table->string('dp_no_hp', 64);

            $table->timestamp('dp_created_at')->useCurrent();
            $table->timestamp('dp_updated_at')->nullable();
            $table->timestamp('dp_deleted_at')->nullable();
        });
    }

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