<?php

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

return new class extends Migration
{
    public function up(): void
    {
        Schema::table('features', function (Blueprint $table) {
            $table->date('planned_start')->nullable()->after('responsible');
            $table->date('planned_end')->nullable()->after('planned_start');
            $table->date('actual_start')->nullable()->after('planned_end');
            $table->date('actual_end')->nullable()->after('actual_start');
            $table->date('baseline_start')->nullable()->after('actual_end');
            $table->date('baseline_end')->nullable()->after('baseline_start');
        });
    }

    public function down(): void
    {
        Schema::table('features', function (Blueprint $table) {
            $table->dropColumn([
                'planned_start', 'planned_end',
                'actual_start', 'actual_end',
                'baseline_start', 'baseline_end',
            ]);
        });
    }
};
