Skip to content

Commit

Permalink
postgres 16 support (#70)
Browse files Browse the repository at this point in the history
* postgres version matrix in github action

* upgrade atlas

* fix for atlas changes
  • Loading branch information
wangzuo authored Oct 9, 2023
1 parent 27bc928 commit 2c91d3e
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 741 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,15 @@ jobs:
path: /usr/local/bin/queryx
postgresql-golang:
needs: [build]
strategy:
matrix:
postgres:
- '14.2'
- '16'
runs-on: ubuntu-latest
services:
postgres:
image: postgres:14.2
image: postgres:${{matrix.postgres}}
env:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
Expand Down
7 changes: 5 additions & 2 deletions cmd/queryx/action/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,9 +203,12 @@ func dbMigrateGenerate() error {
if change.Cmd != "" {
ups = append(ups, change.Cmd+";")
}
if change.Reverse != "" {
downs = append([]string{change.Reverse + ";"}, downs...)

stmts, err := change.ReverseStmts()
if err != nil {
return err
}
downs = append(stmts, downs...)
}
// TODO: support windows line break
up := strings.Join(ups, "\n")
Expand Down
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/swiftcarrot/queryx
go 1.16

require (
ariga.io/atlas v0.4.2
ariga.io/atlas v0.14.2
github.com/agext/levenshtein v1.2.3 // indirect
github.com/go-openapi/inflect v0.19.0
github.com/go-sql-driver/mysql v1.6.0
Expand All @@ -15,6 +15,6 @@ require (
github.com/spf13/cobra v1.4.0
github.com/stretchr/testify v1.8.1
github.com/zclconf/go-cty v1.10.0
golang.org/x/mod v0.7.0
golang.org/x/text v0.6.0 // indirect
golang.org/x/mod v0.8.0
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
)
Loading

0 comments on commit 2c91d3e

Please sign in to comment.