<?php

use Illuminate\Database\Migrations\Migration;

return new class extends Migration
{
    public function up(): void
    {
        if (DB::getDriverName() === 'mysql') {
            DB::statement("ALTER TABLE qr_codes MODIFY COLUMN type ENUM('url','vcard','wifi','pdf','mp3','text','email','phone','sms','location') NOT NULL DEFAULT 'url'");
        }
    }

    public function down(): void
    {
        if (DB::getDriverName() === 'mysql') {
            DB::statement("ALTER TABLE qr_codes MODIFY COLUMN type ENUM('url','vcard','wifi','pdf','mp3','text') NOT NULL DEFAULT 'url'");
        }
    }
};
