id(); $table->string('reference', 125)->nullable(); $table->string('name', 255); $table->string('description', 255)->nullable(); $table->string('type', 125)->nullable(); $table->foreignId('contract_id')->constrained('contracts')->cascadeOnDelete(); // Indexes for faster lookups $table->softDeletes(); $table->timestamps(); $table->index('type'); $table->index('reference'); $table->index('contract_id'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('objects'); Schema::dropIfExists('object_types'); } };