diff --git a/pkg/storage/postgres/migrate.go b/pkg/storage/postgres/migrate.go index 8ab57107d..c0fe38825 100644 --- a/pkg/storage/postgres/migrate.go +++ b/pkg/storage/postgres/migrate.go @@ -156,6 +156,21 @@ var migrations = []func(context.Context, pgx.Tx) error{ } } + return nil + }, + 6: func(ctx context.Context, tx pgx.Tx) error { + // these indices are redundant + for _, q := range []string{ + `DROP INDEX ` + schemaName + `.` + recordsTableName + `_type_idx`, + `DROP INDEX ` + schemaName + `.` + recordChangesTableName + `_version_idx`, + `DROP INDEX ` + schemaName + `.` + recordChangesTableName + `_type_idx`, + } { + _, err := tx.Exec(ctx, q) + if err != nil { + return err + } + } + return nil }, }