uuid('id')->primary()->index(); $table->uuid('user_id')->index(); $table->uuid('parent_id')->nullable(); $table->text('name'); $table->string('basename')->index(); $table->text('mimetype')->nullable(); $table->text('filesize'); $table->text('type')->nullable(); $table->enum('author', ['user', 'member', 'visitor'])->default('user'); $table->softDeletes(); $table->timestamps(); $table->charset = 'utf8mb4'; $table->collation = 'utf8mb4_unicode_ci'; }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('files'); } }