<?php

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

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('tasks', function (Blueprint $table) {
            $table->id();
            $table->tinyInteger("status")->nullable();
            $table->text('title')->nullable();
            $table->longText('task')->nullable();
            $table->date('d1')->nullable();//start
            $table->date('d2')->nullable();//donetime
            $table->date('d3')->nullable();//forsat
            $table->tinyInteger('show_just_end')->default(0)->nullable();
            $table->text('maker')->nullable();
            $table->text('admin')->nullable();
            $table->bigInteger('admin_id')->unsigned()->nullable();
            $table->text('project')->nullable();
            $table->bigInteger('project_id')->unsigned()->nullable();
            $table->timestamps();
        });
//        Schema::table('bwproducts', function (Blueprint $table) {
//            $table->foreign('bw_id')->references('id')->on('bwtable')->onDelete('cascade');
//            //$table->foreign('blog_id')->references('id')->on('blog');
//        });
//        Schema::create('tasks', function (Blueprint $table) {
//            $table->foreign('admin_id')->references('id')->on('admins');
////            $table->foreign('admin_id')->references('id')->on('admins')->onDelete('cascade');
//        });
    }


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