id(); $table->unsignedBigInteger('tanaman_id')->nullable(); $table->unsignedBigInteger('lahan_id')->nullable(); $table->unsignedBigInteger('petani_id')->nullable(); $table->string('tanaman_uid'); $table->date('tgl_inspeksi')->nullable(); $table->string('status_tanaman')->nullable(); $table->string('produktifitas')->nullable(); $table->string('masalah')->nullable(); $table->text('deskripsi')->nullable(); $table->text('tindakan')->nullable(); $table->text('catatan')->nullable(); $table->string('sync_status')->default('pending'); // Audit Columns $table->foreignId('created_by')->nullable()->constrained('users')->onDelete('set null'); $table->foreignId('updated_by')->nullable()->constrained('users')->onDelete('set null'); $table->foreignId('deleted_by')->nullable()->constrained('users')->onDelete('set null'); $table->timestamp('created_date')->useCurrent(); $table->timestamps(); $table->softDeletes(); }); } public function down(): void { Schema::dropIfExists('tanaman_inspeksi'); } };