<?php

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

return new class extends Migration
{
    public function up(): void
    {
        Schema::table('client_groups', function (Blueprint $table) {
            $table->decimal('recurring_discount', 5, 2)->default(0)->after('text_color')
                ->comment('Recurring service discount percentage applied at upgrade/renewal');
        });
    }

    public function down(): void
    {
        Schema::table('client_groups', function (Blueprint $table) {
            $table->dropColumn('recurring_discount');
        });
    }
};
