Skip to content

Commit

Permalink
temp: set foreign_key_checks=0 on soft reset
Browse files Browse the repository at this point in the history
  • Loading branch information
janpio authored Dec 2, 2023
1 parent f0e6ac4 commit 9c5d3b0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion schema-engine/connectors/sql-schema-connector/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(())
Expand Down

0 comments on commit 9c5d3b0

Please sign in to comment.