<?php

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

class CreateOldmembersStatusesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('oldmembers_statuses', function (Blueprint $table) {
            $table->id();
            $table->unsignedBigInteger('member_id');
            $table->boolean('status')->default('0');
            $table->timestamps();
            $table->softDeletes();

            $table->foreign('member_id')->references('id')->on('members')->onDelete('cascade');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
       // Schema::dropIfExists('oldmembers_statuses');
       Schema::table('oldmembers_statuses', function (Blueprint $table) {
        $table->dropSoftDeletes();
    });
    }
}
