From e74a6a63661d56342b467d8544e475b145cc3176 Mon Sep 17 00:00:00 2001 From: George Date: Wed, 4 Sep 2024 11:26:19 -0700 Subject: [PATCH] Minimize diff by reverting subset of changes --- cmd/soroban-rpc/internal/db/migration.go | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/cmd/soroban-rpc/internal/db/migration.go b/cmd/soroban-rpc/internal/db/migration.go index b93b6a21..8ab14e77 100644 --- a/cmd/soroban-rpc/internal/db/migration.go +++ b/cmd/soroban-rpc/internal/db/migration.go @@ -205,18 +205,14 @@ func BuildMigrations( } // - // Add new migrations here: + // Add new DB migrations here: // currentMigrations := map[string]migrationApplierF{ transactionsMigrationName: newTransactionTableMigration, eventsMigrationName: newEventTableMigration, } - mm := MultiMigration{ - migrations: make([]Migration, 0, len(currentMigrations)), - db: db, - } - + migrations := make([]Migration, 0, len(currentMigrations)) for migrationName, migrationFunc := range currentMigrations { migrationLogger := logger.WithField("migration", migrationName) factory := migrationFunc( @@ -237,8 +233,11 @@ func BuildMigrations( continue } - mm.Append(guardedM) + migrations = append(migrations, guardedM) } - return mm, nil + return MultiMigration{ + migrations: migrations, + db: db, + }, nil }