Skip to content

Commit 418fade

Browse files
authored
Merge branch 'master' into upgrade-gosnowflake
2 parents e625916 + 8b9c5f7 commit 418fade

File tree

30 files changed

+141
-145
lines changed

30 files changed

+141
-145
lines changed

.github/workflows/ci.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
- uses: actions/checkout@v4
1313
- uses: actions/setup-go@v5
1414
with:
15-
go-version: "1.24.x"
15+
go-version: "1.25.x"
1616
- name: golangci-lint
1717
uses: golangci/golangci-lint-action@v6
1818
with:
@@ -22,7 +22,7 @@ jobs:
2222
runs-on: ubuntu-latest
2323
strategy:
2424
matrix:
25-
go: ["1.23.x", "1.24.x"]
25+
go: ["1.24.x", "1.25.x"]
2626
steps:
2727
- uses: actions/checkout@v4
2828

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[![Coverage Status](https://img.shields.io/coveralls/github/golang-migrate/migrate/master.svg)](https://coveralls.io/github/golang-migrate/migrate?branch=master)
44
[![packagecloud.io](https://img.shields.io/badge/deb-packagecloud.io-844fec.svg)](https://packagecloud.io/golang-migrate/migrate?filter=debs)
55
[![Docker Pulls](https://img.shields.io/docker/pulls/migrate/migrate.svg)](https://hub.docker.com/r/migrate/migrate/)
6-
![Supported Go Versions](https://img.shields.io/badge/Go-1.23%2C%201.24-lightgrey.svg)
6+
![Supported Go Versions](https://img.shields.io/badge/Go-1.24%2C%201.25-lightgrey.svg)
77
[![GitHub Release](https://img.shields.io/github/release/golang-migrate/migrate.svg)](https://github.com/golang-migrate/migrate/releases)
88
[![Go Report Card](https://goreportcard.com/badge/github.com/golang-migrate/migrate/v4)](https://goreportcard.com/report/github.com/golang-migrate/migrate/v4)
99

cmd/migrate/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ $ scoop install migrate
2727
### Linux (*.deb package)
2828

2929
```bash
30-
$ curl -L https://packagecloud.io/golang-migrate/migrate/gpgkey | apt-key add -
31-
$ echo "deb https://packagecloud.io/golang-migrate/migrate/ubuntu/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/migrate.list
30+
$ curl -fsSL https://packagecloud.io/golang-migrate/migrate/gpgkey | sudo gpg --dearmor -o /etc/apt/keyrings/migrate.gpg
31+
$ echo "deb [signed-by=/etc/apt/keyrings/migrate.gpg] https://packagecloud.io/golang-migrate/migrate/ubuntu/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/migrate.list
3232
$ apt-get update
3333
$ apt-get install -y migrate
3434
```

database/cassandra/cassandra.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@ import (
77
nurl "net/url"
88
"strconv"
99
"strings"
10+
"sync/atomic"
1011
"time"
1112

12-
"go.uber.org/atomic"
13-
1413
"github.com/gocql/gocql"
1514
"github.com/golang-migrate/migrate/v4/database"
1615
"github.com/golang-migrate/migrate/v4/database/multistmt"
@@ -199,14 +198,14 @@ func (c *Cassandra) Close() error {
199198
}
200199

201200
func (c *Cassandra) Lock() error {
202-
if !c.isLocked.CAS(false, true) {
201+
if !c.isLocked.CompareAndSwap(false, true) {
203202
return database.ErrLocked
204203
}
205204
return nil
206205
}
207206

208207
func (c *Cassandra) Unlock() error {
209-
if !c.isLocked.CAS(true, false) {
208+
if !c.isLocked.CompareAndSwap(true, false) {
210209
return database.ErrNotLocked
211210
}
212211
return nil

database/clickhouse/clickhouse.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@ import (
77
"net/url"
88
"strconv"
99
"strings"
10+
"sync/atomic"
1011
"time"
1112

12-
"go.uber.org/atomic"
13-
1413
"github.com/golang-migrate/migrate/v4"
1514
"github.com/golang-migrate/migrate/v4/database"
1615
"github.com/golang-migrate/migrate/v4/database/multistmt"
@@ -291,14 +290,14 @@ func (ch *ClickHouse) Drop() (err error) {
291290
}
292291

293292
func (ch *ClickHouse) Lock() error {
294-
if !ch.isLocked.CAS(false, true) {
293+
if !ch.isLocked.CompareAndSwap(false, true) {
295294
return database.ErrLocked
296295
}
297296

298297
return nil
299298
}
300299
func (ch *ClickHouse) Unlock() error {
301-
if !ch.isLocked.CAS(true, false) {
300+
if !ch.isLocked.CompareAndSwap(true, false) {
302301
return database.ErrNotLocked
303302
}
304303

database/cockroachdb/cockroachdb.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ import (
88
nurl "net/url"
99
"regexp"
1010
"strconv"
11+
"sync/atomic"
1112

1213
"github.com/cockroachdb/cockroach-go/v2/crdb"
1314
"github.com/golang-migrate/migrate/v4"
1415
"github.com/golang-migrate/migrate/v4/database"
1516
"github.com/hashicorp/go-multierror"
1617
"github.com/lib/pq"
17-
"go.uber.org/atomic"
1818
)
1919

2020
func init() {

database/firebird/firebird.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ import (
88
"fmt"
99
"io"
1010
nurl "net/url"
11+
"sync/atomic"
1112

1213
"github.com/golang-migrate/migrate/v4"
1314
"github.com/golang-migrate/migrate/v4/database"
1415
"github.com/hashicorp/go-multierror"
1516
_ "github.com/nakagami/firebirdsql"
16-
"go.uber.org/atomic"
1717
)
1818

1919
func init() {
@@ -107,14 +107,14 @@ func (f *Firebird) Close() error {
107107
}
108108

109109
func (f *Firebird) Lock() error {
110-
if !f.isLocked.CAS(false, true) {
110+
if !f.isLocked.CompareAndSwap(false, true) {
111111
return database.ErrLocked
112112
}
113113
return nil
114114
}
115115

116116
func (f *Firebird) Unlock() error {
117-
if !f.isLocked.CAS(true, false) {
117+
if !f.isLocked.CompareAndSwap(true, false) {
118118
return database.ErrNotLocked
119119
}
120120
return nil

database/mongodb/mongodb.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"net/url"
88
"os"
99
"strconv"
10+
"sync/atomic"
1011
"time"
1112

1213
"github.com/cenkalti/backoff/v4"
@@ -16,7 +17,6 @@ import (
1617
"go.mongodb.org/mongo-driver/mongo"
1718
"go.mongodb.org/mongo-driver/mongo/options"
1819
"go.mongodb.org/mongo-driver/x/mongo/driver/connstring"
19-
"go.uber.org/atomic"
2020
)
2121

2222
func init() {

database/mysql/mysql.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,9 @@ import (
1313
"os"
1414
"strconv"
1515
"strings"
16+
"sync/atomic"
1617
"time"
1718

18-
"go.uber.org/atomic"
19-
2019
"github.com/go-sql-driver/mysql"
2120
"github.com/golang-migrate/migrate/v4/database"
2221
"github.com/hashicorp/go-multierror"

database/pgx/pgx.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,9 @@ import (
1111
"regexp"
1212
"strconv"
1313
"strings"
14+
"sync/atomic"
1415
"time"
1516

16-
"go.uber.org/atomic"
17-
1817
"github.com/golang-migrate/migrate/v4"
1918
"github.com/golang-migrate/migrate/v4/database"
2019
"github.com/golang-migrate/migrate/v4/database/multistmt"

0 commit comments

Comments
 (0)