Larael Drop Foreign Key
Schema::table('posts', function (Blueprint $table) {
$table->dropForeign(['category_id']);
});
Fahim Foysal
Schema::table('posts', function (Blueprint $table) {
$table->dropForeign(['category_id']);
});
//...
class ClearOldOauthRelations extends Migration
{
public function up()
{
Schema::disableForeignKeyConstraints();
// drop foreign keys
Schema::table('oauth_access_tokens', function (BluePrint $table) {
$table->dropForeign('oauth_access_tokens_session_id_foreign');
});
//...
Schema::enableForeignKeyConstraints();
}
//...
}