Skip to content

Commit

Permalink
go 1.20 in github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
o.i.musin committed Jun 28, 2023
1 parent 3813346 commit 7e96985
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.19
go-version: 1.20

- name: Build
run: go build -v ./...
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

About
---------
Once I faced with a issue to change our corporate migrations library in Golang from [rubenv/sql-migrate](https://github.com/rubenv/sql-migrate)
Once I faced with an issue to change our corporate migrations library in Golang from [rubenv/sql-migrate](https://github.com/rubenv/sql-migrate)
to [golang-migrate](https://github.com/golang-migrate) and it was so hard.
There are several caveats that you should know about, so it can save you some time:
- You have to split each sql-migrate file in 2 files: up and down migration.
- By default migrations in sql-migrate are running in transaction-default mode, but in golang-migrate you have to wrap it in BEGIN;COMMIT; for transactions.
- By default, migrations in sql-migrate are running in transaction-default mode, but in golang-migrate you have to wrap it in BEGIN;COMMIT; for transactions.
- Golang-migrate [doesn't like](https://github.com/golang-migrate/migrate/issues/731) the same timestamp for different files.
- You [can't](https://github.com/golang-migrate/migrate/issues/284) create several indexes concurrently without adding x-multi-statement=true flag for DB connection.
However, please note that this flag [will break](https://github.com/golang-migrate/migrate/issues/590) your CREATE FUNCTION ... AS $$ symbol.
Expand Down

0 comments on commit 7e96985

Please sign in to comment.