Fix another one

This commit is contained in:
Neil Alexander 2022-10-18 10:50:24 +01:00
parent 8daddef611
commit a863754c4c
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944

View file

@ -58,7 +58,7 @@ func UpRenameTables(ctx context.Context, tx *sql.Tx) error {
return err
}
query = strings.Replace(query, old, new, 1)
if _, err := tx.ExecContext(ctx, "DROP INDEX %s;", old); err != nil {
if _, err := tx.ExecContext(ctx, fmt.Sprintf("DROP INDEX %s;", old)); err != nil {
return fmt.Errorf("drop index %q to %q error: %w", old, new, err)
}
if _, err := tx.ExecContext(ctx, query); err != nil {