From afea8e304afe7e46f71fdbac162e192341062a19 Mon Sep 17 00:00:00 2001 From: fabianlindfors Date: Wed, 5 Jan 2022 14:13:54 +0100 Subject: [PATCH] Use IF EXISTS when dropping helpers --- src/helpers.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/helpers.rs b/src/helpers.rs index eae4568..dfd2c29 100644 --- a/src/helpers.rs +++ b/src/helpers.rs @@ -33,6 +33,6 @@ pub fn set_up_helpers(db: &mut dyn Conn, current_migration: &Option) -> } pub fn tear_down_helpers(db: &mut dyn Conn) -> anyhow::Result<()> { - db.query("DROP FUNCTION reshape.is_old_schema;")?; + db.query("DROP FUNCTION IF EXISTS reshape.is_old_schema;")?; Ok(()) }