<?php

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

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::table('purchase_details', function (Blueprint $table) {
            //
            DB::statement("ALTER TABLE purchase_details CHANGE purchase_type purchase_type ENUM('bundle', 'course', 'subscription') NOT NULL");
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('purchase_details', function (Blueprint $table) {
            //
            DB::statement("ALTER TABLE purchase_details CHANGE purchase_type purchase_type ENUM('bundle', 'course') NOT NULL");
        });
    }
};
