Skip to content

Commit afea19d

Browse files
authored
feat(postgres-sql-attachments): allow multiple statements executed (#1143)
1 parent 9e3a51c commit afea19d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ops/targets/postgres.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -790,10 +790,10 @@ impl AttachmentSetupChange for SqlStatementAttachmentSetupChange {
790790

791791
async fn apply_change(&self) -> Result<()> {
792792
for teardown_sql in self.teardown_sql_to_run.iter() {
793-
sqlx::query(teardown_sql).execute(&self.db_pool).await?;
793+
sqlx::raw_sql(teardown_sql).execute(&self.db_pool).await?;
794794
}
795795
if let Some(setup_sql) = &self.setup_sql_to_run {
796-
sqlx::query(setup_sql).execute(&self.db_pool).await?;
796+
sqlx::raw_sql(setup_sql).execute(&self.db_pool).await?;
797797
}
798798
Ok(())
799799
}

0 commit comments

Comments
 (0)