id(); $table->timestamps(); $table->string("servername")->unique(); $table->timestamp("last_seen")->nullable(); $table->bigInteger("storage")->comment("In Byte, for cache"); $table->bigInteger("userd")->comment("Userd Space in Byte")->nullable(); }); Schema::table("images", function (Blueprint $table) { $table->string("servername")->nullable(); $table->foreign('servername')->references('servername')->on('servers'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists("servers"); /*Schema::table("images", function (Blueprint $table) { $table->dropConstrainedForeignId("servername"); $table->dropColumn("servername"); });*/ } }