diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e3ea1970..476b9647 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -31,8 +31,8 @@ jobs: path: ~/go/pkg/mod key: ${{ runner.os }}-go-${{ matrix.go }}-${{ hashFiles('go.mod') }} - - name: Tests - run: GORM_DIALECT=sqlite ./test.sh + # - name: Tests + # run: GORM_DIALECT=sqlite ./test.sh mysql: needs: sqlite @@ -75,8 +75,8 @@ jobs: path: ~/go/pkg/mod key: ${{ runner.os }}-go-${{ matrix.go }}-${{ hashFiles('go.mod') }} - - name: Tests - run: GORM_ENABLE_CACHE=true GORM_DIALECT=mysql GORM_DSN="gorm:gorm@tcp(localhost:9910)/gorm?charset=utf8&parseTime=True" ./test.sh + # - name: Tests + # run: GORM_ENABLE_CACHE=true GORM_DIALECT=mysql GORM_DSN="gorm:gorm@tcp(localhost:9910)/gorm?charset=utf8&parseTime=True" ./test.sh postgres: needs: sqlite @@ -120,7 +120,7 @@ jobs: key: ${{ runner.os }}-go-${{ matrix.go }}-${{ hashFiles('go.mod') }} - name: Tests - run: GORM_ENABLE_CACHE=true GORM_DIALECT=postgres GORM_DSN="user=gorm password=gorm dbname=gorm host=localhost port=9920 sslmode=disable TimeZone=Asia/Shanghai" ./test.sh + run: GORM_DIALECT=postgres GORM_DSN="user=gorm password=gorm dbname=gorm host=localhost port=9920 sslmode=disable TimeZone=Asia/Shanghai" ./test.sh sqlserver: needs: sqlite @@ -163,5 +163,5 @@ jobs: path: ~/go/pkg/mod key: ${{ runner.os }}-go-${{ matrix.go }}-${{ hashFiles('go.mod') }} - - name: Tests - run: GORM_ENABLE_CACHE=true GORM_DIALECT=sqlserver GORM_DSN="sqlserver://gorm:LoremIpsum86@localhost:9930?database=gorm" ./test.sh + # - name: Tests + # run: GORM_ENABLE_CACHE=true GORM_DIALECT=sqlserver GORM_DSN="sqlserver://gorm:LoremIpsum86@localhost:9930?database=gorm" ./test.sh diff --git a/go.mod b/go.mod index f194634f..96125e49 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ toolchain go1.23.3 require ( gorm.io/driver/mysql v1.5.7 - gorm.io/driver/postgres v1.5.10 + gorm.io/driver/postgres v1.5.11 gorm.io/driver/sqlite v1.5.6 gorm.io/driver/sqlserver v1.5.4 gorm.io/gen v0.3.26 @@ -26,14 +26,14 @@ require ( github.com/jinzhu/inflection v1.0.0 // indirect github.com/jinzhu/now v1.1.5 // indirect github.com/mattn/go-sqlite3 v1.14.24 // indirect - github.com/microsoft/go-mssqldb v1.7.2 // indirect - golang.org/x/crypto v0.29.0 // indirect + github.com/microsoft/go-mssqldb v1.8.0 // indirect + golang.org/x/crypto v0.30.0 // indirect golang.org/x/mod v0.22.0 // indirect - golang.org/x/sync v0.9.0 // indirect - golang.org/x/sys v0.27.0 // indirect - golang.org/x/text v0.20.0 // indirect - golang.org/x/tools v0.27.0 // indirect - gorm.io/datatypes v1.2.4 // indirect + golang.org/x/sync v0.10.0 // indirect + golang.org/x/sys v0.28.0 // indirect + golang.org/x/text v0.21.0 // indirect + golang.org/x/tools v0.28.0 // indirect + gorm.io/datatypes v1.2.5 // indirect gorm.io/hints v1.1.2 // indirect gorm.io/plugin/dbresolver v1.5.3 // indirect ) diff --git a/models.go b/models.go index 692a6842..c4a4957b 100644 --- a/models.go +++ b/models.go @@ -45,7 +45,7 @@ type Pet struct { type Toy struct { gorm.Model Name string - OwnerID string + OwnerID string `gorm:"index:owner_id,type:btree,option:CONCURRENTLY"` OwnerType string }