Skip to content

Commit 8d57316

Browse files
authored
Merge branch 'golang-migrate:master' into master
2 parents 067ca8f + 9023d66 commit 8d57316

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+53
-85
lines changed

.github/workflows/ci.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,17 @@ jobs:
1212
- uses: actions/checkout@v4
1313
- uses: actions/setup-go@v5
1414
with:
15-
go-version: "1.23.x"
15+
go-version: "1.24.x"
1616
- name: golangci-lint
1717
uses: golangci/golangci-lint-action@v6
1818
with:
19-
version: v1.63.4
19+
version: v1.64.8
2020

2121
test:
2222
runs-on: ubuntu-latest
2323
strategy:
2424
matrix:
25-
go: ["1.22.x", "1.23.x"]
25+
go: ["1.23.x", "1.24.x"]
2626
steps:
2727
- uses: actions/checkout@v4
2828

@@ -68,7 +68,7 @@ jobs:
6868
ruby-version: 2.7
6969
- uses: actions/setup-go@v5
7070
with:
71-
go-version: "1.23.x"
71+
go-version: "1.24.x"
7272

7373
- uses: docker/setup-qemu-action@v3
7474
- uses: docker/setup-buildx-action@v3

.golangci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,14 @@ linters:
1313
- unparam
1414
- nakedret
1515
- prealloc
16+
- revive
1617
#- gosec
1718
linters-settings:
1819
misspell:
1920
locale: US
21+
revive:
22+
rules:
23+
- name: redundant-build-tag
2024
issues:
2125
max-same-issues: 0
2226
max-issues-per-linter: 0

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.23-alpine3.20 AS builder
1+
FROM golang:1.24-alpine3.21 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.20
18+
FROM alpine:3.21
1919

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

README.md

Lines changed: 2 additions & 2 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.22%2C%201.23-lightgrey.svg)
6+
![Supported Go Versions](https://img.shields.io/badge/Go-1.23%2C%201.24-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

@@ -88,7 +88,7 @@ Source drivers read migrations from local or remote sources. [Add a new source?]
8888
* Handles ctrl+c (SIGINT) gracefully.
8989
* No config search paths, no config files, no magic ENV var injections.
9090

91-
__[CLI Documentation](cmd/migrate)__
91+
[CLI Documentation](cmd/migrate) (includes CLI install instructions)
9292

9393
### Basic usage
9494

cmd/migrate/README.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,18 @@ Options:
8686
-help Print usage
8787

8888
Commands:
89-
create [-ext E] [-dir D] [-seq] [-digits N] [-format] NAME
90-
Create a set of timestamped up/down migrations titled NAME, in directory D with extension E.
91-
Use -seq option to generate sequential up/down migrations with N digits.
92-
Use -format option to specify a Go time format string.
89+
create [-ext E] [-dir D] [-seq] [-digits N] [-format] [-tz] NAME
90+
Create a set of timestamped up/down migrations titled NAME, in directory D with extension E.
91+
Use -seq option to generate sequential up/down migrations with N digits.
92+
Use -format option to specify a Go time format string. Note: migrations with the same time cause "duplicate migration version" error.
93+
Use -tz option to specify the timezone that will be used when generating non-sequential migrations (defaults: UTC).
94+
9395
goto V Migrate to version V
9496
up [N] Apply all or N up migrations
95-
down [N] Apply all or N down migrations
96-
drop Drop everything inside database
97+
down [N] [-all] Apply all or N down migrations
98+
Use -all to apply all down migrations
99+
drop [-f] Drop everything inside database
100+
Use -f to bypass confirmation
97101
force V Set version V but don't run migration (ignores dirty state)
98102
version Print current migration version
99103
```

database/firebird/firebird.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//go:build go1.9
2-
// +build go1.9
32

43
package firebird
54

database/mysql/mysql.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//go:build go1.9
2-
// +build go1.9
32

43
package mysql
54

database/pgx/pgx.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//go:build go1.9
2-
// +build go1.9
32

43
package pgx
54

database/pgx/v5/pgx.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//go:build go1.9
2-
// +build go1.9
32

43
package pgx
54

database/postgres/postgres.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//go:build go1.9
2-
// +build go1.9
32

43
package postgres
54

0 commit comments

Comments
 (0)