<?php

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

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('test_cases_for_sprint', function (Blueprint $table) {
            $table->id();
            $table->string('name');
            $table->string('position');
            $table->string('input')->nullable();
            $table->string('expect_output');
            $table->string('actual_output');
            $table->string('note')->nullable();
            $table->string('issue_id_on_jira')->nullable();
            $table->string('bug_id_on_jira')->nullable();
            $table->unsignedBigInteger('sprint_id');
            $table->string('created_by');
            $table->timestamps();
            
            $table->foreign('sprint_id')->references('id')->on('sprint')->onDelete('cascade');
        });
    }

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