2021_10_08_110118_create_formals_table.php 1.08 KB
<?php

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

class CreateFormalsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('formals', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('dokumen_id')->nullable();
            
            $table->foreignId('kategori_id')->references('id')->on('kategoris');
            $table->string('nomor')->nullable(false);
            $table->string('tahun')->nullable(false);
            $table->string('nama')->nullable(false);
            $table->string('keterangan')->nullable();
            $table->date('tanggal_sk')->nullable();
            $table->timestamp('created_at');
            $table->timestamp('updated_at');
            $table->timestamp('deleted_at');
        });
    }

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