<?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('companies', function (Blueprint $table) {
            $table->string('originating_bank', 4)->nullable()->after('postal_code');
            $table->string('originating_branch', 3)->nullable()->after('originating_bank');
            $table->string('originating_account', 12)->nullable()->after('originating_branch');
            $table->string('originating_account_name', 20)->nullable()->after('originating_account');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('companies', function (Blueprint $table) {
            $table->dropColumn([
                'originating_bank',
                'originating_branch',
                'originating_account',
                'originating_account_name',
            ]);
        });
    }
};
