fix: only create/drop index if exists in migration (#856)

Co-authored-by: Thegaram <Thegaram@users.noreply.github.com>
This commit is contained in:
Péter Garamvölgyi
2023-08-22 11:27:49 +02:00
committed by GitHub
parent 1f62596b0a
commit 8b611b443a
3 changed files with 6 additions and 6 deletions

View File

@@ -6,7 +6,7 @@ import (
"strings"
)
var tag = "v4.1.89"
var tag = "v4.1.90"
var commit = func() string {
if info, ok := debug.ReadBuildInfo(); ok {

View File

@@ -1,15 +1,15 @@
-- +goose Up
-- +goose StatementBegin
drop index l1_message_hash_uindex;
drop index if exists l1_message_hash_uindex;
create index l1_message_hash_index
create index if not exists l1_message_hash_index
on l1_message (msg_hash) where deleted_at IS NULL;
-- +goose StatementEnd
-- +goose Down
-- +goose StatementBegin
drop index l1_message_hash_index;
drop index if exists l1_message_hash_index;
create unique index l1_message_hash_uindex
create unique index if not exists l1_message_hash_uindex
on l1_message (msg_hash) where deleted_at IS NULL;
-- +goose StatementEnd

View File

@@ -51,7 +51,7 @@ func TestMain(m *testing.M) {
}
func TestCoordinatorProverInteraction(t *testing.T) {
// Start postgres docker containers.
// Start postgres docker containers
base.RunL2Geth(t)
base.RunDBImage(t)