bigIncrements('id'); $table->unsignedBigInteger('user_id')->unsigned(); $table->string('file_type'); $table->datetime('deleted_at')->nullable(); $table->integer('deleted_by')->nullable(); $table->timestamps(); $table->foreign('user_id') ->references('id')->on('users') ->onDelete('cascade'); }); // once the table is created use a raw query to ALTER it and add the MEDIUMBLOB DB::statement("ALTER TABLE file ADD filename LONGBLOB"); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('files'); } }