<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\DB;

return new class extends Migration
{
    public function up(): void
    {
        DB::table('transfer_requests')
            ->where('type', 'international')
            ->update(['type' => 'wire_transfer']);

        DB::table('transactions')
            ->where('source', 'international_transfer')
            ->update(['source' => 'wire_transfer']);
    }

    public function down(): void
    {
        DB::table('transfer_requests')
            ->where('type', 'wire_transfer')
            ->update(['type' => 'international']);

        DB::table('transactions')
            ->where('source', 'wire_transfer')
            ->update(['source' => 'international_transfer']);
    }
};
