id(); $table->foreignId('project_id')->constrained()->onDelete('cascade'); $table->foreignId('layer_id')->constrained()->onDelete('cascade'); $table->string('feature_id'); // ID del elemento GeoJSON $table->foreignId('template_id')->nullable()->constrained('inspection_templates')->onDelete('set null'); $table->foreignId('user_id')->constrained(); $table->json('data'); // Valores de los campos del template $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('inspections'); } };