<?php

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

class CreateLivingCaresTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('living_cares', function (Blueprint $table) {
            $table->id();
            $table->unsignedBigInteger("id_pasien")->nullable();
            $table->foreign("id_pasien")->references("id")->on("pasiens");
            $table->json("domain1")->nullable();
            $table->json("domain2")->nullable();
            $table->json("domain3")->nullable();
            $table->json("domain4")->nullable();
            $table->timestamps();
        });
    }

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