<?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::table('orders', function (Blueprint $table) {
            $table->string('number')->nullable()->change();
            $table->string('status')->nullable()->change();

            $table->string('shipping_method')->nullable()->change();

            $table->string('customer_name')->nullable()->change();
            $table->string('customer_phone')->nullable()->change();
            $table->string('customer_address')->nullable()->change();

            $table->string('delivery_time')->nullable()->change();
            $table->date('delivery_at')->nullable()->change();

            $table->string('region')->nullable()->change();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('orders', function (Blueprint $table) {
            $table->string('delivery_time')->change();
            $table->date('delivery_at')->change();
        });
    }
};
