<?php

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

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::table('preferences', function (Blueprint $table) {
            // Free Plan
            $table->string('subcription_heading_free')->nullable();
            $table->string('subcription_sub_heading_free')->nullable();
            $table->text('subcription_description_free')->nullable();
            $table->string('subcription_duration_free')->nullable();

            // Paid Plan
            $table->string('subcription_heading')->nullable();
            $table->string('subcription_sub_heading')->nullable();
            $table->text('subcription_description')->nullable();
            $table->string('subcription_duration')->nullable();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('preferences', function (Blueprint $table) {
            $table->dropColumn([
                'subcription_heading_free',
                'subcription_sub_heading_free',
                'subcription_description_free',
                'subcription_duration_free',
                'subcription_heading',
                'subcription_sub_heading',
                'subcription_description',
                'subcription_duration',
            ]);
        });
    }
};
