From 1bbe867b252d5ab8a4ff6101b94936312f4b35d5 Mon Sep 17 00:00:00 2001 From: Quentin Champenois <26109239+Quentinchampenois@users.noreply.github.com> Date: Sun, 15 Sep 2024 09:19:01 +0200 Subject: [PATCH] feat: Copy versions array to local var Co-authored-by: Matt Roberts --- app/pkg/dbx/migrate.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/pkg/dbx/migrate.go b/app/pkg/dbx/migrate.go index a7941402d..eebe43154 100644 --- a/app/pkg/dbx/migrate.go +++ b/app/pkg/dbx/migrate.go @@ -147,7 +147,7 @@ func getLastMigration() (int, error) { } func getPendingMigrations(versions []int) ([]int, error) { - pendingMigrations := versions + pendingMigrations := append([]int(nil), versions...) rows, err := conn.Query("SELECT version FROM migrations_history WHERE version = ANY($1)", pq.Array(pendingMigrations)) if err != nil {