<?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::create('vendors', function (Blueprint $t) { $t->id(); $t->string('name', 255); $t->string('contact_name', 255)->nullable(); $t->string('email', 255)->nullable(); $t->string('phone', 255)->nullable(); $t->boolean('is_active')->default(1); $t->timestamp('created_at')->nullable(); $t->timestamp('updated_at')->nullable(); $t->index('is_active', 'vendors_is_active_index'); }); } public function down(): void { Schema::dropIfExists('vendors'); } }; 