Skip to content

Commit

Permalink
feat: Copy versions array to local var
Browse files Browse the repository at this point in the history
Co-authored-by: Matt Roberts <[email protected]>
  • Loading branch information
Quentinchampenois and mattwoberts authored Sep 15, 2024
1 parent 9486347 commit 1bbe867
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/pkg/dbx/migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 1bbe867

Please sign in to comment.