Migration: From github.com to git.webz.asia
This commit is contained in:
parent
43856fcc4f
commit
f219b96782
18
.travis.yml
18
.travis.yml
@ -28,19 +28,19 @@ jobs:
|
|||||||
script:
|
script:
|
||||||
- go get -t -v ./...
|
- go get -t -v ./...
|
||||||
- CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "-s -w
|
- CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "-s -w
|
||||||
-X 'github.com/go-migration/gorm-goose/version.BuildVersion=`git tag|tail -n1`'
|
-X 'git.webz.asia/go-migration/gorm-goose/version.BuildVersion=`git tag|tail -n1`'
|
||||||
-X 'github.com/go-migration/gorm-goose/version.BuildHash=`git rev-parse HEAD`'
|
-X 'git.webz.asia/go-migration/gorm-goose/version.BuildHash=`git rev-parse HEAD`'
|
||||||
-X 'github.com/go-migration/gorm-goose/version.BuildTime=`date`'"
|
-X 'git.webz.asia/go-migration/gorm-goose/version.BuildTime=`date`'"
|
||||||
-o ./gorm-goose-x64.linux ./cmd/gorm-goose/
|
-o ./gorm-goose-x64.linux ./cmd/gorm-goose/
|
||||||
- CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -ldflags "-s -w
|
- CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -ldflags "-s -w
|
||||||
-X 'github.com/go-migration/gorm-goose/version.BuildVersion=`git tag|tail -n1`'
|
-X 'git.webz.asia/go-migration/gorm-goose/version.BuildVersion=`git tag|tail -n1`'
|
||||||
-X 'github.com/go-migration/gorm-goose/version.BuildHash=`git rev-parse HEAD`'
|
-X 'git.webz.asia/go-migration/gorm-goose/version.BuildHash=`git rev-parse HEAD`'
|
||||||
-X 'github.com/go-migration/gorm-goose/version.BuildTime=`date`'"
|
-X 'git.webz.asia/go-migration/gorm-goose/version.BuildTime=`date`'"
|
||||||
-o ./gorm-goose-x64.macos ./cmd/gorm-goose/
|
-o ./gorm-goose-x64.macos ./cmd/gorm-goose/
|
||||||
- CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags "-s -w
|
- CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags "-s -w
|
||||||
-X 'github.com/go-migration/gorm-goose/version.BuildVersion=`git tag|tail -n1`'
|
-X 'git.webz.asia/go-migration/gorm-goose/version.BuildVersion=`git tag|tail -n1`'
|
||||||
-X 'github.com/go-migration/gorm-goose/version.BuildHash=`git rev-parse HEAD`'
|
-X 'git.webz.asia/go-migration/gorm-goose/version.BuildHash=`git rev-parse HEAD`'
|
||||||
-X 'github.com/go-migration/gorm-goose/version.BuildTime=`date`'"
|
-X 'git.webz.asia/go-migration/gorm-goose/version.BuildTime=`date`'"
|
||||||
-o ./gorm-goose-x64.exe ./cmd/gorm-goose/
|
-o ./gorm-goose-x64.exe ./cmd/gorm-goose/
|
||||||
deploy:
|
deploy:
|
||||||
provider: releases
|
provider: releases
|
||||||
|
10
README.md
10
README.md
@ -1,5 +1,5 @@
|
|||||||
[![Go Report Card](https://goreportcard.com/badge/github.com/go-migration/gorm-goose)](https://goreportcard.com/report/github.com/go-migration/gorm-goose)
|
[![Go Report Card](https://goreportcard.com/badge/git.webz.asia/go-migration/gorm-goose)](https://goreportcard.com/report/git.webz.asia/go-migration/gorm-goose)
|
||||||
[![Actions Status](https://github.com/go-migration/gorm-goose/workflows/Go/badge.svg)](https://github.com/go-migration/gorm-goose/actions)
|
[![Actions Status](https://git.webz.asia/go-migration/gorm-goose/workflows/Go/badge.svg)](https://git.webz.asia/go-migration/gorm-goose/actions)
|
||||||
[![Build Status](https://travis-ci.org/go-migration/gorm-goose.svg?branch=master)](https://travis-ci.org/go-migration/gorm-goose)
|
[![Build Status](https://travis-ci.org/go-migration/gorm-goose.svg?branch=master)](https://travis-ci.org/go-migration/gorm-goose)
|
||||||
[![codecov](https://codecov.io/gh/go-migration/gorm-goose/branch/master/graph/badge.svg)](https://codecov.io/gh/go-migration/gorm-goose)
|
[![codecov](https://codecov.io/gh/go-migration/gorm-goose/branch/master/graph/badge.svg)](https://codecov.io/gh/go-migration/gorm-goose)
|
||||||
|
|
||||||
@ -14,11 +14,11 @@ You can manage your database's evolution by creating incremental SQL or Go scrip
|
|||||||
|
|
||||||
## Install
|
## Install
|
||||||
|
|
||||||
$ go get github.com/go-migration/gorm-goose/cmd/gorm-goose
|
$ go get git.webz.asia/go-migration/gorm-goose/cmd/gorm-goose
|
||||||
|
|
||||||
This will install the `gorm-goose` binary to your `$GOPATH/bin` directory.
|
This will install the `gorm-goose` binary to your `$GOPATH/bin` directory.
|
||||||
|
|
||||||
You can also build gorm-goose into your own applications by importing `github.com/go-migration/gorm-goose/lib/gorm-goose`.
|
You can also build gorm-goose into your own applications by importing `git.webz.asia/go-migration/gorm-goose/lib/gorm-goose`.
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
@ -215,7 +215,7 @@ These instructions assume that you're using [Keith Rarick's Heroku Go buildpack]
|
|||||||
// note: need at least one blank line after build constraint
|
// note: need at least one blank line after build constraint
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import _ "github.com/go-migration/gorm-goose/cmd/gorm-goose"
|
import _ "git.webz.asia/go-migration/gorm-goose/cmd/gorm-goose"
|
||||||
```
|
```
|
||||||
|
|
||||||
[Set up your Heroku database(s) as usual.](https://devcenter.heroku.com/articles/heroku-postgresql)
|
[Set up your Heroku database(s) as usual.](https://devcenter.heroku.com/articles/heroku-postgresql)
|
||||||
|
@ -28,7 +28,7 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
goose "github.com/go-migration/gorm-goose/lib/gorm-goose"
|
goose "git.webz.asia/go-migration/gorm-goose/lib/gorm-goose"
|
||||||
)
|
)
|
||||||
|
|
||||||
var createCmd = &Command{
|
var createCmd = &Command{
|
||||||
|
@ -25,7 +25,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"log"
|
"log"
|
||||||
|
|
||||||
goose "github.com/go-migration/gorm-goose/lib/gorm-goose"
|
goose "git.webz.asia/go-migration/gorm-goose/lib/gorm-goose"
|
||||||
)
|
)
|
||||||
|
|
||||||
var dbVersionCmd = &Command{
|
var dbVersionCmd = &Command{
|
||||||
|
@ -24,7 +24,7 @@ package main
|
|||||||
import (
|
import (
|
||||||
"log"
|
"log"
|
||||||
|
|
||||||
goose "github.com/go-migration/gorm-goose/lib/gorm-goose"
|
goose "git.webz.asia/go-migration/gorm-goose/lib/gorm-goose"
|
||||||
)
|
)
|
||||||
|
|
||||||
var downCmd = &Command{
|
var downCmd = &Command{
|
||||||
|
@ -24,7 +24,7 @@ package main
|
|||||||
import (
|
import (
|
||||||
"log"
|
"log"
|
||||||
|
|
||||||
goose "github.com/go-migration/gorm-goose/lib/gorm-goose"
|
goose "git.webz.asia/go-migration/gorm-goose/lib/gorm-goose"
|
||||||
)
|
)
|
||||||
|
|
||||||
var redoCmd = &Command{
|
var redoCmd = &Command{
|
||||||
|
@ -27,7 +27,7 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
goose "github.com/go-migration/gorm-goose/lib/gorm-goose"
|
goose "git.webz.asia/go-migration/gorm-goose/lib/gorm-goose"
|
||||||
"github.com/jinzhu/gorm"
|
"github.com/jinzhu/gorm"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ package main
|
|||||||
import (
|
import (
|
||||||
"log"
|
"log"
|
||||||
|
|
||||||
goose "github.com/go-migration/gorm-goose/lib/gorm-goose"
|
goose "git.webz.asia/go-migration/gorm-goose/lib/gorm-goose"
|
||||||
)
|
)
|
||||||
|
|
||||||
var upCmd = &Command{
|
var upCmd = &Command{
|
||||||
|
@ -28,8 +28,8 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"text/template"
|
"text/template"
|
||||||
|
|
||||||
goose "github.com/go-migration/gorm-goose/lib/gorm-goose"
|
goose "git.webz.asia/go-migration/gorm-goose/lib/gorm-goose"
|
||||||
"github.com/go-migration/gorm-goose/version"
|
"git.webz.asia/go-migration/gorm-goose/version"
|
||||||
)
|
)
|
||||||
|
|
||||||
// global options. available to any subcommands.
|
// global options. available to any subcommands.
|
||||||
|
6
go.mod
6
go.mod
@ -1,8 +1,8 @@
|
|||||||
module github.com/go-migration/gorm-goose
|
module git.webz.asia/go-migration/gorm-goose
|
||||||
|
|
||||||
go 1.13
|
go 1.13
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/jinzhu/gorm v1.9.12
|
github.com/jinzhu/gorm v1.9.12
|
||||||
github.com/kylelemons/go-gypsy v0.0.0-20160905020020-08cad365cd28
|
github.com/kylelemons/go-gypsy v0.0.0-20160905020020-08cad365cd28
|
||||||
)
|
)
|
||||||
|
5
go.sum
5
go.sum
@ -1,13 +1,17 @@
|
|||||||
|
github.com/denisenkom/go-mssqldb v0.0.0-20191124224453-732737034ffd h1:83Wprp6ROGeiHFAP8WJdI2RoxALQYgdllERc3N5N2DM=
|
||||||
github.com/denisenkom/go-mssqldb v0.0.0-20191124224453-732737034ffd/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU=
|
github.com/denisenkom/go-mssqldb v0.0.0-20191124224453-732737034ffd/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU=
|
||||||
|
github.com/erikstmartin/go-testdb v0.0.0-20160219214506-8d10e4a1bae5 h1:Yzb9+7DPaBjB8zlTR87/ElzFsnQfuHnVUVqpZZIcV5Y=
|
||||||
github.com/erikstmartin/go-testdb v0.0.0-20160219214506-8d10e4a1bae5/go.mod h1:a2zkGnVExMxdzMo3M0Hi/3sEU+cWnZpSni0O6/Yb/P0=
|
github.com/erikstmartin/go-testdb v0.0.0-20160219214506-8d10e4a1bae5/go.mod h1:a2zkGnVExMxdzMo3M0Hi/3sEU+cWnZpSni0O6/Yb/P0=
|
||||||
github.com/go-sql-driver/mysql v1.4.1 h1:g24URVg0OFbNUTx9qqY1IRZ9D9z3iPyi5zKhQZpNwpA=
|
github.com/go-sql-driver/mysql v1.4.1 h1:g24URVg0OFbNUTx9qqY1IRZ9D9z3iPyi5zKhQZpNwpA=
|
||||||
github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
|
github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
|
||||||
|
github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe h1:lXe2qZdvpiX5WZkZR4hgp4KJVfY3nMkvmwbVkpv1rVY=
|
||||||
github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0=
|
github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0=
|
||||||
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||||
github.com/jinzhu/gorm v1.9.12 h1:Drgk1clyWT9t9ERbzHza6Mj/8FY/CqMyVzOiHviMo6Q=
|
github.com/jinzhu/gorm v1.9.12 h1:Drgk1clyWT9t9ERbzHza6Mj/8FY/CqMyVzOiHviMo6Q=
|
||||||
github.com/jinzhu/gorm v1.9.12/go.mod h1:vhTjlKSJUTWNtcbQtrMBFCxy7eXTzeCAzfL5fBZT/Qs=
|
github.com/jinzhu/gorm v1.9.12/go.mod h1:vhTjlKSJUTWNtcbQtrMBFCxy7eXTzeCAzfL5fBZT/Qs=
|
||||||
github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E=
|
github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E=
|
||||||
github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc=
|
github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc=
|
||||||
|
github.com/jinzhu/now v1.0.1 h1:HjfetcXq097iXP0uoPCdnM4Efp5/9MsM0/M+XOTeR3M=
|
||||||
github.com/jinzhu/now v1.0.1/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
|
github.com/jinzhu/now v1.0.1/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
|
||||||
github.com/kylelemons/go-gypsy v0.0.0-20160905020020-08cad365cd28 h1:mkl3tvPHIuPaWsLtmHTybJeoVEW7cbePK73Ir8VtruA=
|
github.com/kylelemons/go-gypsy v0.0.0-20160905020020-08cad365cd28 h1:mkl3tvPHIuPaWsLtmHTybJeoVEW7cbePK73Ir8VtruA=
|
||||||
github.com/kylelemons/go-gypsy v0.0.0-20160905020020-08cad365cd28/go.mod h1:T/T7jsxVqf9k/zYOqbgNAsANsjxTd1Yq3htjDhQ1H0c=
|
github.com/kylelemons/go-gypsy v0.0.0-20160905020020-08cad365cd28/go.mod h1:T/T7jsxVqf9k/zYOqbgNAsANsjxTd1Yq3htjDhQ1H0c=
|
||||||
@ -17,6 +21,7 @@ github.com/mattn/go-sqlite3 v2.0.1+incompatible h1:xQ15muvnzGBHpIpdrNi1DA5x0+TcB
|
|||||||
github.com/mattn/go-sqlite3 v2.0.1+incompatible/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
|
github.com/mattn/go-sqlite3 v2.0.1+incompatible/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
|
||||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||||
golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||||
|
golang.org/x/crypto v0.0.0-20191205180655-e7c4368fe9dd h1:GGJVjV8waZKRHrgwvtH66z9ZGVurTD1MT0n1Bb+q4aM=
|
||||||
golang.org/x/crypto v0.0.0-20191205180655-e7c4368fe9dd/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
golang.org/x/crypto v0.0.0-20191205180655-e7c4368fe9dd/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||||
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||||
|
@ -118,7 +118,7 @@ import (
|
|||||||
"encoding/gob"
|
"encoding/gob"
|
||||||
|
|
||||||
_ "{{.Import}}"
|
_ "{{.Import}}"
|
||||||
goose "github.com/go-migration/gorm-goose/lib/gorm-goose"
|
goose "git.webz.asia/go-migration/gorm-goose/lib/gorm-goose"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
Loading…
Reference in New Issue
Block a user