dropForeign('ds_fk_yabs'); } $table->foreign('id', 'ds_fk_yabs')->references('id')->on('yabs')->onDelete('cascade'); }); Schema::table('network_speed', function (Blueprint $table) { if (env('DB_CONNECTION') !== 'sqlite') { $table->dropForeign('ns_fk_yabs'); } $table->foreign('id', 'ns_fk_yabs')->references('id')->on('yabs')->onDelete('cascade'); }); } };