id(); $table->morphs('model'); $table->uuid()->nullable()->unique(); $table->string('collection_name'); $table->string('name'); $table->string('file_name'); $table->string('mime_type')->nullable(); $table->string('disk'); $table->string('conversions_disk')->nullable(); $table->unsignedBigInteger('size'); $table->json('manipulations'); $table->json('custom_properties'); $table->json('generated_conversions'); $table->json('responsive_images'); $table->unsignedInteger('order_column')->nullable()->index(); $table->unsignedBigInteger('directory_id')->nullable(); $table->unsignedBigInteger('created_by')->nullable(); $table->foreign('directory_id')->references('id')->on('media_directories')->onDelete('set null'); $table->foreign('created_by')->references('id')->on('users')->onDelete(action: 'set null'); $table->nullableTimestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('media'); } };