bigIncrements('id'); $table->string("no_transfer")->nullable(); $table->date("transfer_date"); $table->string("reason")->nullable(); $table->enum("status", ['transit', 'done']); $table->bigInteger('source_warehouse_id')->unsigned(); $table->foreign('source_warehouse_id') ->references('id') ->on('warehouses') ->onDelete('cascade'); $table->bigInteger('destination_warehouse_id')->unsigned(); $table->foreign('destination_warehouse_id') ->references('id') ->on('warehouses') ->onDelete('cascade'); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('transfer_orders'); } }