<?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('plans', function (Blueprint $table): void {
            $table->string('shoppy_product_id')->nullable()->after('pricing_id');
            $table->boolean('accept_stripe')->default(false)->after('shoppy_product_id');
            $table->boolean('accept_shoppy')->default(false)->after('accept_stripe');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('plans', function (Blueprint $table): void {
            $table->dropColumn(['shoppy_product_id', 'accept_stripe', 'accept_shoppy']);
        });
    }
};
