Skip to content

Commit 2dafb4e

Browse files
authored
Merge pull request #231 from go-gormigrate/update-deps
Update deps
2 parents 76f4e68 + ddc4170 commit 2dafb4e

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

.github/workflows/integration-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Checkout
16-
uses: actions/checkout@v4
16+
uses: actions/checkout@v5
1717

1818
- name: Lint
19-
uses: golangci/golangci-lint-action@v6
19+
uses: golangci/golangci-lint-action@v8
2020
with:
2121
version: latest
2222
working-directory: integration-test

.github/workflows/lint.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,19 @@ jobs:
1212
lint:
1313
strategy:
1414
matrix:
15-
go: ['1.24', '1.23', '1.22', '1.21', '1.20', '1.19', '1.18']
15+
go: ['1.25', '1.24', '1.23', '1.22', '1.21', '1.20', '1.19', '1.18']
1616
runs-on: ubuntu-latest
1717
steps:
1818
- name: Checkout
19-
uses: actions/checkout@v4
19+
uses: actions/checkout@v5
2020

2121
- name: Install Go
2222
uses: actions/setup-go@v5
2323
with:
2424
go-version: ${{ matrix.go }}
2525

2626
- name: Lint
27-
uses: golangci/golangci-lint-action@v4
27+
uses: golangci/golangci-lint-action@v8
2828
with:
2929
version: latest
3030
args: --skip-dirs=integration-test

gormigrate.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
package gormigrate
33

44
import (
5+
"context"
56
"errors"
67
"fmt"
78
"reflect"
@@ -382,7 +383,7 @@ func (g *Gormigrate) runMigration(migration *Migration) error {
382383
// struct defined as {
383384
// ID string `gorm:"primaryKey;column:<Options.IDColumnName>;size:<Options.IDColumnSize>"`
384385
// }
385-
func (g *Gormigrate) model() interface{} {
386+
func (g *Gormigrate) model() any {
386387
f := reflect.StructField{
387388
Name: reflect.ValueOf("ID").Interface().(string),
388389
Type: reflect.TypeOf(""),
@@ -439,7 +440,11 @@ func (g *Gormigrate) unknownMigrationsHaveHappened() (bool, error) {
439440
if err != nil {
440441
return false, err
441442
}
442-
defer rows.Close()
443+
defer func() {
444+
if err := rows.Close(); err != nil {
445+
g.tx.Logger.Error(context.TODO(), err.Error())
446+
}
447+
}()
443448

444449
validIDSet := make(map[string]struct{}, len(g.migrations)+1)
445450
validIDSet[initSchemaMigrationID] = struct{}{}

0 commit comments

Comments
 (0)