bigIncrements('id'); $table->unsignedInteger('album_id'); $table->string('name'); $table->string('description')->default(''); $table->string('file_name'); $table->string('mime_type'); $table->unsignedBigInteger('file_size'); $table->timestamps(); $table->foreign('album_id') ->references('id')->on('albums') ->onDelete('no action'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('photos'); } }