<?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('accounts', function (Blueprint $table) {
            // JSON array of strings: ["vip", "eski-musteri", "premium"]
            // Bulk modifier "Etiket Ekle" işlemi bu kolona unique-append eder.
            $table->json('tags')->nullable()->after('admin_notes');
        });
    }

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