Skip to content

Commit 091a26b

Browse files
Prometheus2677FPiety0521
authored and
FPiety0521
committed
Revert "Remove support for Go modules"
This reverts commit 5e96539f55495f6fa80240037db6cb1886a99b89.
1 parent b71fc30 commit 091a26b

Some content is hidden

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

59 files changed

+342
-96
lines changed

.travis.yml

+4-3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ go_import_path: github.com/golang-migrate/migrate
1414

1515
env:
1616
global:
17+
- GO111MODULE=on
1718
- MIGRATE_TEST_CONTAINER_BOOT_TIMEOUT=60
1819
- DOCKER_USERNAME=golangmigrate
1920
- secure: "oSOznzUrgr5h45qW4PONkREpisPAt40tnM+KFWtS/Ggu5UI2Ie0CmyYXWuBjbt7B97a4yN9Qzmn8FxJHJ7kk+ABOi3muhkxeIhr6esXbzHhX/Jhv0mj1xkzX7KoVN9oHBz3cOI/QeRyEAO68xjDHNE2kby4RTT9VBt6TQUakKVkqI5qkqLBTADepCjVC+9XhxVxUNyeWKU8ormaUfJBjoNVoDlwXekUPnJenfmfZqXxUInvBCfUyp7Pq+kurBORmg4yc6qOlRYuK67Xw+i5xpjbZouNlXPk0rq7pPy5zjhmZQ3kImoFPvNMeKViDcI6kSIJKtjdhms9/g/6MgXS9HlL5kFy8tYKbsyiHnHB1BsvaLAKXctbUZFDPstgMPADfnad2kZXPrNqIhfWKZrGRWidawCYJ1sKKwYxLMKrtA0umqgMoL90MmBOELhuGmvMV0cFJB+zo+K2YWjEiMGd8xRb5mC5aAy0ZcCehO46jGtpr217EJmMF8Ywr7cFqM2Shg5U2jev9qUpYiXwmPnJKDuoT2ZHuHmPgFIkYiWC5yeJnnmG5bed1sKBp93AFrJX+1Rx5oC4BpNegewmBZKpOSwls/D1uMAeQK3dPmQHLsT6o2VBLfeDGr+zY0R85ywwPZCv00vGol02zYoTqN7eFqr6Qhjr/qx5K1nnxJdFK3Ts="
@@ -32,12 +33,12 @@ cache:
3233
before_install:
3334
- echo "TRAVIS_GO_VERSION=${TRAVIS_GO_VERSION}"
3435
# Download the binary to bin folder in $GOPATH
35-
- curl -L -s https://github.com/golang/dep/releases/download/v0.5.0/dep-linux-amd64 -o $GOPATH/bin/dep
36+
- if [[ "${TRAVIS_GO_VERSION}" == 1.10* ]]; then curl -L -s https://github.com/golang/dep/releases/download/v0.5.0/dep-linux-amd64 -o $GOPATH/bin/dep; fi
3637
# Make the binary executable
37-
- chmod +x $GOPATH/bin/dep
38+
- if [[ "${TRAVIS_GO_VERSION}" == 1.10* ]]; then chmod +x $GOPATH/bin/dep; fi
3839

3940
install:
40-
- dep ensure -vendor-only
41+
- if [[ "${TRAVIS_GO_VERSION}" == 1.10* ]]; then dep ensure -vendor-only; fi
4142
- go get github.com/mattn/goveralls
4243

4344
script:

Dockerfile

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ COPY cli ./cli
1515
COPY database ./database
1616
COPY source ./source
1717

18+
ENV GO111MODULE=on
1819
ENV DATABASES="postgres mysql redshift cassandra spanner cockroachdb clickhouse"
1920
ENV SOURCES="file go_bindata github aws_s3 google_cloud_storage"
2021

README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,9 @@ __[Go Documentation](https://godoc.org/github.com/golang-migrate/migrate)__
107107

108108
```go
109109
import (
110-
"github.com/golang-migrate/migrate"
111-
_ "github.com/golang-migrate/migrate/database/postgres"
112-
_ "github.com/golang-migrate/migrate/source/github"
110+
"github.com/golang-migrate/migrate/v3"
111+
_ "github.com/golang-migrate/migrate/v3/database/postgres"
112+
_ "github.com/golang-migrate/migrate/v3/source/github"
113113
)
114114

115115
func main() {
@@ -126,9 +126,9 @@ Want to use an existing database client?
126126
import (
127127
"database/sql"
128128
_ "github.com/lib/pq"
129-
"github.com/golang-migrate/migrate"
130-
"github.com/golang-migrate/migrate/database/postgres"
131-
_ "github.com/golang-migrate/migrate/source/file"
129+
"github.com/golang-migrate/migrate/v3"
130+
"github.com/golang-migrate/migrate/v3/database/postgres"
131+
_ "github.com/golang-migrate/migrate/v3/source/file"
132132
)
133133

134134
func main() {

cli/build_aws-s3.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
package main
44

55
import (
6-
_ "github.com/golang-migrate/migrate/source/aws_s3"
6+
_ "github.com/golang-migrate/migrate/v3/source/aws_s3"
77
)

cli/build_cassandra.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
package main
44

55
import (
6-
_ "github.com/golang-migrate/migrate/database/cassandra"
6+
_ "github.com/golang-migrate/migrate/v3/database/cassandra"
77
)

cli/build_clickhouse.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
package main
44

55
import (
6-
_ "github.com/golang-migrate/migrate/database/clickhouse"
6+
_ "github.com/golang-migrate/migrate/v3/database/clickhouse"
77
_ "github.com/kshvakov/clickhouse"
88
)

cli/build_cockroachdb.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
package main
44

55
import (
6-
_ "github.com/golang-migrate/migrate/database/cockroachdb"
6+
_ "github.com/golang-migrate/migrate/v3/database/cockroachdb"
77
)

cli/build_github.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
package main
44

55
import (
6-
_ "github.com/golang-migrate/migrate/source/github"
6+
_ "github.com/golang-migrate/migrate/v3/source/github"
77
)

cli/build_go-bindata.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
package main
44

55
import (
6-
_ "github.com/golang-migrate/migrate/source/go_bindata"
6+
_ "github.com/golang-migrate/migrate/v3/source/go_bindata"
77
)

cli/build_godoc-vfs.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
package main
44

55
import (
6-
_ "github.com/golang-migrate/migrate/source/godoc_vfs"
6+
_ "github.com/golang-migrate/migrate/v3/source/godoc_vfs"
77
)

cli/build_google-cloud-storage.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
package main
44

55
import (
6-
_ "github.com/golang-migrate/migrate/source/google_cloud_storage"
6+
_ "github.com/golang-migrate/migrate/v3/source/google_cloud_storage"
77
)

cli/build_mysql.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
package main
44

55
import (
6-
_ "github.com/golang-migrate/migrate/database/mysql"
6+
_ "github.com/golang-migrate/migrate/v3/database/mysql"
77
)

cli/build_postgres.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
package main
44

55
import (
6-
_ "github.com/golang-migrate/migrate/database/postgres"
6+
_ "github.com/golang-migrate/migrate/v3/database/postgres"
77
)

cli/build_ql.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
package main
44

55
import (
6-
_ "github.com/golang-migrate/migrate/database/ql"
6+
_ "github.com/golang-migrate/migrate/v3/database/ql"
77
)

cli/build_redshift.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
package main
44

55
import (
6-
_ "github.com/golang-migrate/migrate/database/redshift"
6+
_ "github.com/golang-migrate/migrate/v3/database/redshift"
77
)

cli/build_spanner.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
package main
44

55
import (
6-
_ "github.com/golang-migrate/migrate/database/spanner"
6+
_ "github.com/golang-migrate/migrate/v3/database/spanner"
77
)

cli/build_sqlite3.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
package main
44

55
import (
6-
_ "github.com/golang-migrate/migrate/database/sqlite3"
6+
_ "github.com/golang-migrate/migrate/v3/database/sqlite3"
77
)

cli/commands.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ package main
33
import (
44
"errors"
55
"fmt"
6-
"github.com/golang-migrate/migrate"
7-
_ "github.com/golang-migrate/migrate/database/stub" // TODO remove again
8-
_ "github.com/golang-migrate/migrate/source/file"
6+
"github.com/golang-migrate/migrate/v3"
7+
_ "github.com/golang-migrate/migrate/v3/database/stub" // TODO remove again
8+
_ "github.com/golang-migrate/migrate/v3/source/file"
99
"os"
1010
"path/filepath"
1111
"strconv"

cli/main.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ import (
1010
"syscall"
1111
"time"
1212

13-
"github.com/golang-migrate/migrate"
14-
"github.com/golang-migrate/migrate/database"
15-
"github.com/golang-migrate/migrate/source"
13+
"github.com/golang-migrate/migrate/v3"
14+
"github.com/golang-migrate/migrate/v3/database"
15+
"github.com/golang-migrate/migrate/v3/source"
1616
)
1717

1818
const defaultTimeFormat = "20060102150405"

database/cassandra/cassandra.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
"time"
1212

1313
"github.com/gocql/gocql"
14-
"github.com/golang-migrate/migrate/database"
14+
"github.com/golang-migrate/migrate/v3/database"
1515
)
1616

1717
func init() {

database/cassandra/cassandra_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import (
77

88
"github.com/gocql/gocql"
99

10-
dt "github.com/golang-migrate/migrate/database/testing"
11-
mt "github.com/golang-migrate/migrate/testing"
10+
dt "github.com/golang-migrate/migrate/v3/database/testing"
11+
mt "github.com/golang-migrate/migrate/v3/testing"
1212
)
1313

1414
var versions = []mt.Version{

database/clickhouse/clickhouse.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import (
99
"strings"
1010
"time"
1111

12-
"github.com/golang-migrate/migrate"
13-
"github.com/golang-migrate/migrate/database"
12+
"github.com/golang-migrate/migrate/v3"
13+
"github.com/golang-migrate/migrate/v3/database"
1414
)
1515

1616
var DefaultMigrationsTable = "schema_migrations"

database/cockroachdb/cockroachdb.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ import (
1717
)
1818

1919
import (
20-
"github.com/golang-migrate/migrate"
21-
"github.com/golang-migrate/migrate/database"
20+
"github.com/golang-migrate/migrate/v3"
21+
"github.com/golang-migrate/migrate/v3/database"
2222
)
2323

2424
func init() {

database/cockroachdb/cockroachdb_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ import (
1010
"testing"
1111

1212
"bytes"
13-
dt "github.com/golang-migrate/migrate/database/testing"
14-
mt "github.com/golang-migrate/migrate/testing"
13+
dt "github.com/golang-migrate/migrate/v3/database/testing"
14+
mt "github.com/golang-migrate/migrate/v3/testing"
1515
"github.com/lib/pq"
1616
)
1717

database/mysql/mysql.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ import (
2020
)
2121

2222
import (
23-
"github.com/golang-migrate/migrate"
24-
"github.com/golang-migrate/migrate/database"
23+
"github.com/golang-migrate/migrate/v3"
24+
"github.com/golang-migrate/migrate/v3/database"
2525
)
2626

2727
func init() {

database/mysql/mysql_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ import (
1313
)
1414

1515
import (
16-
dt "github.com/golang-migrate/migrate/database/testing"
17-
mt "github.com/golang-migrate/migrate/testing"
16+
dt "github.com/golang-migrate/migrate/v3/database/testing"
17+
mt "github.com/golang-migrate/migrate/v3/testing"
1818
)
1919

2020
var versions = []mt.Version{

database/postgres/postgres.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ import (
1212
"strconv"
1313
"strings"
1414

15-
"github.com/golang-migrate/migrate"
16-
"github.com/golang-migrate/migrate/database"
15+
"github.com/golang-migrate/migrate/v3"
16+
"github.com/golang-migrate/migrate/v3/database"
1717
"github.com/lib/pq"
1818
)
1919

database/postgres/postgres_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ import (
1313
"strings"
1414
"testing"
1515

16-
dt "github.com/golang-migrate/migrate/database/testing"
17-
mt "github.com/golang-migrate/migrate/testing"
16+
dt "github.com/golang-migrate/migrate/v3/database/testing"
17+
mt "github.com/golang-migrate/migrate/v3/testing"
1818
)
1919

2020
var versions = []mt.Version{

database/ql/ql.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ import (
1010
nurl "net/url"
1111

1212
_ "github.com/cznic/ql/driver"
13-
"github.com/golang-migrate/migrate"
14-
"github.com/golang-migrate/migrate/database"
13+
"github.com/golang-migrate/migrate/v3"
14+
"github.com/golang-migrate/migrate/v3/database"
1515
)
1616

1717
func init() {

database/ql/ql_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ import (
99
"testing"
1010

1111
_ "github.com/cznic/ql/driver"
12-
"github.com/golang-migrate/migrate"
13-
dt "github.com/golang-migrate/migrate/database/testing"
14-
_ "github.com/golang-migrate/migrate/source/file"
12+
"github.com/golang-migrate/migrate/v3"
13+
dt "github.com/golang-migrate/migrate/v3/database/testing"
14+
_ "github.com/golang-migrate/migrate/v3/source/file"
1515
)
1616

1717
func Test(t *testing.T) {

database/redshift/redshift.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ package redshift
33
import (
44
"net/url"
55

6-
"github.com/golang-migrate/migrate/database"
7-
"github.com/golang-migrate/migrate/database/postgres"
6+
"github.com/golang-migrate/migrate/v3/database"
7+
"github.com/golang-migrate/migrate/v3/database/postgres"
88
)
99

1010
// init registers the driver under the name 'redshift'

database/spanner/spanner.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ import (
1414
"cloud.google.com/go/spanner"
1515
sdb "cloud.google.com/go/spanner/admin/database/apiv1"
1616

17-
"github.com/golang-migrate/migrate"
18-
"github.com/golang-migrate/migrate/database"
17+
"github.com/golang-migrate/migrate/v3"
18+
"github.com/golang-migrate/migrate/v3/database"
1919

2020
"google.golang.org/api/iterator"
2121
adminpb "google.golang.org/genproto/googleapis/spanner/admin/database/v1"

database/spanner/spanner_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"os"
66
"testing"
77

8-
dt "github.com/golang-migrate/migrate/database/testing"
8+
dt "github.com/golang-migrate/migrate/v3/database/testing"
99
)
1010

1111
func Test(t *testing.T) {

database/sqlite3/sqlite3.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ package sqlite3
33
import (
44
"database/sql"
55
"fmt"
6-
"github.com/golang-migrate/migrate"
7-
"github.com/golang-migrate/migrate/database"
6+
"github.com/golang-migrate/migrate/v3"
7+
"github.com/golang-migrate/migrate/v3/database"
88
_ "github.com/mattn/go-sqlite3"
99
"io"
1010
"io/ioutil"

database/sqlite3/sqlite3_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ package sqlite3
33
import (
44
"database/sql"
55
"fmt"
6-
"github.com/golang-migrate/migrate"
7-
dt "github.com/golang-migrate/migrate/database/testing"
8-
_ "github.com/golang-migrate/migrate/source/file"
6+
"github.com/golang-migrate/migrate/v3"
7+
dt "github.com/golang-migrate/migrate/v3/database/testing"
8+
_ "github.com/golang-migrate/migrate/v3/source/file"
99
_ "github.com/mattn/go-sqlite3"
1010
"io/ioutil"
1111
"os"

database/stub/stub.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"io/ioutil"
66
"reflect"
77

8-
"github.com/golang-migrate/migrate/database"
8+
"github.com/golang-migrate/migrate/v3/database"
99
)
1010

1111
func init() {

database/stub/stub_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package stub
33
import (
44
"testing"
55

6-
dt "github.com/golang-migrate/migrate/database/testing"
6+
dt "github.com/golang-migrate/migrate/v3/database/testing"
77
)
88

99
func Test(t *testing.T) {

database/testing/testing.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"testing"
1111
"time"
1212

13-
"github.com/golang-migrate/migrate/database"
13+
"github.com/golang-migrate/migrate/v3/database"
1414
)
1515

1616
// Test runs tests against database implementations.

0 commit comments

Comments
 (0)