mirror of
https://github.com/fabianlindfors/reshape.git
synced 2024-11-22 12:12:27 +03:00
Drop index concurrently when aborting add_index
This commit is contained in:
parent
480bcf8af1
commit
b617c8dcda
@ -59,10 +59,9 @@ impl Action for AddIndex {
|
||||
fn abort(&self, _ctx: &MigrationContext, db: &mut dyn Conn) -> anyhow::Result<()> {
|
||||
db.run(&format!(
|
||||
"
|
||||
DROP INDEX {name} ON {table}
|
||||
DROP INDEX CONCURRENTLY IF EXISTS {name}
|
||||
",
|
||||
name = self.name,
|
||||
table = self.table,
|
||||
))
|
||||
.context("failed to drop index")?;
|
||||
Ok(())
|
||||
|
Loading…
Reference in New Issue
Block a user