id(); $table->unsignedBigInteger('person_id'); $table->string('filename'); $table->string('original_filename')->nullable(); $table->string('file_path'); $table->string('mime_type')->nullable(); $table->integer('file_size')->nullable(); // in KB $table->boolean('is_profile_photo')->default(false); $table->text('caption')->nullable(); $table->timestamps(); $table->softDeletes(); // Foreign key constraint $table->foreign('person_id') ->references('person_id') ->on('person') ->onDelete('cascade'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('photos'); } };