<?php

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

class CreateDefaultTaxLedgersInputTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('default_tax_ledgers_input', function (Blueprint $table) {
            $table->id();
            $table->bigInteger('tax_id')->nullable()->unsigned();
            $table->foreign('tax_id')->references('id')->on('tax_ledgers');
            $table->string('ledger_name')->nullable();
            $table->text('description')->nullable();
            $table->timestamps();
        });
    }

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