<?php

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

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        DB::table('productos_attributes')
            ->where('type', 'text')
            ->update(['type' => 'string']);

        DB::table('productos_attributes')
            ->where('type', 'numeric')
            ->update(['type' => 'number']);
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        DB::table('productos_attributes')
            ->where('type', 'string')
            ->update(['type' => 'text']);

        DB::table('productos_attributes')
            ->where('type', 'number')
            ->update(['type' => 'numeric']);
    }
};
