Skip to content

Commit 7ad80c9

Browse files
committed
Merge remote-tracking branch 'origin/master' into only_go_change
2 parents 7d9c74d + a5dc5d1 commit 7ad80c9

32 files changed

+1166
-207
lines changed

.github/workflows/ci.yaml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ jobs:
99
name: lint
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/setup-go@v3
12+
- uses: actions/setup-go@v5
1313
with:
14-
go-version: "1.20.x"
15-
- uses: actions/checkout@v3
14+
go-version: "1.21.x"
15+
- uses: actions/checkout@v4
1616
- name: golangci-lint
1717
uses: golangci/golangci-lint-action@v3
1818
with:
@@ -22,11 +22,11 @@ jobs:
2222
runs-on: ubuntu-latest
2323
strategy:
2424
matrix:
25-
go: ["1.19.x", "1.20.x"]
25+
go: ["1.20.x", "1.21.x"]
2626
steps:
27-
- uses: actions/checkout@v3
27+
- uses: actions/checkout@v4
2828

29-
- uses: actions/setup-go@v3
29+
- uses: actions/setup-go@v5
3030
with:
3131
go-version: ${{ matrix.go }}
3232

@@ -60,30 +60,30 @@ jobs:
6060
# 3. When the workflow is triggered by a tag with `v` prefix
6161
if: ${{ success() && github.repository == 'golang-migrate/migrate' && startsWith(github.ref, 'refs/tags/v') }}
6262
steps:
63-
- uses: actions/checkout@v3
63+
- uses: actions/checkout@v4
6464
with:
6565
fetch-depth: 0
6666
- uses: ruby/setup-ruby@v1
6767
with:
6868
ruby-version: 2.7
69-
- uses: actions/setup-go@v3
69+
- uses: actions/setup-go@v5
7070
with:
71-
go-version: "1.19.x"
71+
go-version: "1.21.x"
7272

73-
- uses: docker/setup-qemu-action@v1
74-
- uses: docker/setup-buildx-action@v1
75-
- uses: docker/login-action@v1
73+
- uses: docker/setup-qemu-action@v3
74+
- uses: docker/setup-buildx-action@v3
75+
- uses: docker/login-action@v3
7676
with:
7777
username: golangmigrate
7878
password: ${{ secrets.DOCKERHUB_TOKEN }}
7979

8080
- run: echo "SOURCE=$(make echo-source)" >> $GITHUB_ENV
8181
- run: echo "DATABASE=$(make echo-database)" >> $GITHUB_ENV
8282

83-
- uses: goreleaser/goreleaser-action@v2
83+
- uses: goreleaser/goreleaser-action@v5
8484
with:
8585
version: latest
86-
args: release --rm-dist
86+
args: release --clean
8787
env:
8888
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8989

.goreleaser.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ release:
8787
prerelease: auto
8888
source:
8989
enabled: true
90-
rlcp: true
9190
format: zip
9291
changelog:
9392
skip: false

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.20-alpine3.18 AS builder
1+
FROM golang:1.21-alpine3.19 AS builder
22
ARG VERSION
33

44
RUN apk add --no-cache git gcc musl-dev make
@@ -15,7 +15,7 @@ COPY . ./
1515

1616
RUN make build-docker
1717

18-
FROM alpine:3.18
18+
FROM alpine:3.19
1919

2020
RUN apk add --no-cache ca-certificates
2121

Dockerfile.github-actions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM alpine:3.18
1+
FROM alpine:3.19
22

33
RUN apk add --no-cache ca-certificates
44

FAQ.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
and whenever we want, not just once at the beginning of all tests.
5151

5252
#### Can I maintain my driver in my own repository?
53-
Yes, technically thats possible. We want to encourage you to contribute your driver to this respository though.
53+
Yes, technically thats possible. We want to encourage you to contribute your driver to this repository though.
5454
The driver's functionality is dictated by migrate's interfaces. That means there should really
5555
just be one driver for a database/ source. We want to prevent a future where several drivers doing the exact same thing,
5656
just implemented a bit differently, co-exist somewhere on GitHub. If users have to do research first to find the

GETTING_STARTED.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ migrate -database YOUR_DATABASE_URL -path PATH_TO_YOUR_MIGRATIONS up
2828

2929
Just add the code to your app and you're ready to go!
3030

31-
Before commiting your migrations you should run your migrations up, down, and then up again to see if migrations are working properly both ways.
31+
Before committing your migrations you should run your migrations up, down, and then up again to see if migrations are working properly both ways.
3232
(e.g. if you created a table in a migration but reverse migration did not delete it, you will encounter an error when running the forward migration again)
3333
It's also worth checking your migrations in a separate, containerized environment. You can find some tools at the [end of this document](#further-reading).
3434

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
SOURCE ?= file go_bindata github github_ee bitbucket aws_s3 google_cloud_storage godoc_vfs gitlab
2-
DATABASE ?= postgres mysql redshift cassandra spanner cockroachdb yugabytedb clickhouse mongodb sqlserver firebird neo4j pgx pgx5
2+
DATABASE ?= postgres mysql redshift cassandra spanner cockroachdb yugabytedb clickhouse mongodb sqlserver firebird neo4j pgx pgx5 rqlite
33
DATABASE_TEST ?= $(DATABASE) sqlite sqlite3 sqlcipher
44
VERSION ?= $(shell git describe --tags 2>/dev/null | cut -c 2-)
55
TEST_FLAGS ?=

README.md

Lines changed: 4 additions & 3 deletions
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.19%2C%201.20-lightgrey.svg)
6+
![Supported Go Versions](https://img.shields.io/badge/Go-1.20%2C%201.21-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

@@ -28,11 +28,11 @@ Database drivers run migrations. [Add a new database?](database/driver.go)
2828
* [PGX v5](database/pgx/v5)
2929
* [Redshift](database/redshift)
3030
* [Ql](database/ql)
31-
* [Cassandra](database/cassandra)
31+
* [Cassandra / ScyllaDB](database/cassandra)
3232
* [SQLite](database/sqlite)
3333
* [SQLite3](database/sqlite3) ([todo #165](https://github.com/mattes/migrate/issues/165))
3434
* [SQLCipher](database/sqlcipher)
35-
* [MySQL/ MariaDB](database/mysql)
35+
* [MySQL / MariaDB](database/mysql)
3636
* [Neo4j](database/neo4j)
3737
* [MongoDB](database/mongodb)
3838
* [CrateDB](database/crate) ([todo #170](https://github.com/mattes/migrate/issues/170))
@@ -43,6 +43,7 @@ Database drivers run migrations. [Add a new database?](database/driver.go)
4343
* [ClickHouse](database/clickhouse)
4444
* [Firebird](database/firebird)
4545
* [MS SQL Server](database/sqlserver)
46+
* [rqlite](database/rqlite)
4647

4748
### Database URLs
4849

database/cassandra/README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
1-
# Cassandra
1+
# Cassandra / ScyllaDB
22

3-
* Drop command will not work on Cassandra 2.X because it rely on
3+
* `Drop()` method will not work on Cassandra 2.X because it rely on
44
system_schema table which comes with 3.X
5-
* Other commands should work properly but are **not tested**
5+
* Other methods should work properly but are **not tested**
66
* The Cassandra driver (gocql) does not natively support executing multiple statements in a single query. To allow for multiple statements in a single migration, you can use the `x-multi-statement` param. There are two important caveats:
77
* This mode splits the migration text into separately-executed statements by a semi-colon `;`. Thus `x-multi-statement` cannot be used when a statement in the migration contains a string with a semi-colon.
88
* The queries are not executed in any sort of transaction/batch, meaning you are responsible for fixing partial migrations.
99

10+
**ScyllaDB**
11+
12+
* No additional configuration is required since it is a drop-in replacement for Cassandra.
13+
* The `Drop()` method` works for ScyllaDB 5.1
14+
1015

1116
## Usage
1217
`cassandra://host:port/keyspace?param1=value&param2=value2`

database/cassandra/cassandra_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,11 @@ var (
2525
// Although Cassandra 2.x is supported by the Apache Foundation,
2626
// the migrate db driver only supports Cassandra 3.x since it uses
2727
// the system_schema keyspace.
28+
// last ScyllaDB version tested is 5.1.11
2829
specs = []dktesting.ContainerSpec{
2930
{ImageName: "cassandra:3.0", Options: opts},
3031
{ImageName: "cassandra:3.11", Options: opts},
32+
{ImageName: "scylladb/scylla:5.1.11", Options: opts},
3133
}
3234
)
3335

0 commit comments

Comments
 (0)