<?php

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

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        $builder = DB::connection()->getSchemaBuilder();
        $builder->blueprintResolver(function ($table, $callback) {
            return new Blueprint($table, $callback);
        });

        $builder->create('pricelist_files', function (Blueprint $table) {
            $table->id();
            $table->string('filename');
            $table->timestamps();
            $table->softDeletes();
            $table->userIdFields();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        DB::connection()->getSchemaBuilder()->dropIfExists('pricelist_files');
    }
};
