id(); $table->softDeletes(); $table->uuid()->nullable()->unique(); $table->foreignId('media_collection_id'); $table->foreignId('user_id')->nullable(); $table->enum('media_type', ['video', 'image', 'audio', 'any']); $table->enum('media_source', ['ai_generated', 'user_uploaded', 'system_uploaded', 'user_rendered', 'system_rendered']); $table->string('name')->nullable(); $table->string('media_provider'); $table->string('mime_type'); $table->string('file_name'); $table->string('file_path'); $table->string('disk'); $table->timestamps(); $table->foreign('media_collection_id')->references('id')->on('media_collections'); $table->index('media_source'); $table->index('media_type'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('medias'); } };