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