id(); $table->string('filename'); $table->string('path'); $table->string('type'); $table->json('metadata')->nullable(); $table->integer('size'); $table->timestamps(); $table->foreign('parent_id')->references('id')->on('media')->onDelete('set null'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('media'); } };