increments('id'); $table->timestamps(); $table->string('name',50); }); Schema::table('einteilungen', function (Blueprint $table) { $table->integer('arbeitsplatz_id')->unsigned(); $table->foreign('arbeitsplatz_id')->references('id')->on('arbeitsplaetze'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('einteilungen', function (Blueprint $table) { $table->dropForeign('einteilungen_arbeitsplatz_id_foreign'); $table->dropColumn('arbeitsplatz_id'); }); Schema::dropIfExists('arbeitsplaetze'); } }