<?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('tenants', function (Blueprint $table) {
            // The auto-created workspace at registration — can't be left /
            // removed-from; the fallback active pointer for a member whose
            // team workspace is deleted (Δ9).
            $table->boolean('personal')->default(false)->after('name');
        });
    }

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