<?php

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

return new class extends Migration
{
    public function up(): void
    {
        Schema::table('tenants', function (Blueprint $table): void {
            $table->boolean('display_cart')->default(true)->after('display_seach_bar');
        });

        DB::table('tenants')->update(['display_cart' => true]);
        DB::table('tenants')
            ->where('codigo', 'desfile_pura_tendencia')
            ->update(['display_cart' => false]);
    }

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