diff --git a/schema-engine/connectors/sql-schema-connector/src/lib.rs b/schema-engine/connectors/sql-schema-connector/src/lib.rs index 66924c2b5a9b..21e57f210cd5 100644 --- a/schema-engine/connectors/sql-schema-connector/src/lib.rs +++ b/schema-engine/connectors/sql-schema-connector/src/lib.rs @@ -409,12 +409,14 @@ async fn best_effort_reset_impl( return Ok(()); } - let migration = apply_migration::render_script( + let mut migration = apply_migration::render_script( &Migration::new(migration), &DestructiveChangeDiagnostics::default(), flavour, )?; + migration = format!("SET foreign_key_checks = 0;{}\n", migration); + flavour.raw_cmd(&migration).await?; Ok(())