Repository: amacneil/dbmate
Pull request #398 (2023-02-27 04:08:53)

Update import paths for v2


Patch:
diff --git a/README.md b/README.md
index e24420f..9d5d7de 100644
--- a/README.md
+++ b/README.md
@@ -2,7 +2,7 @@
 
 [![Release](https://img.shields.io/github/release/amacneil/dbmate.svg)](https://github.com/amacneil/dbmate/releases)
 [![Go Report](https://goreportcard.com/badge/github.com/amacneil/dbmate)](https://goreportcard.com/report/github.com/amacneil/dbmate)
-[![Reference](https://img.shields.io/badge/go.dev-reference-blue?logo=go&logoColor=white)](https://pkg.go.dev/github.com/amacneil/dbmate/pkg/dbmate)
+[![Reference](https://img.shields.io/badge/go.dev-reference-blue?logo=go&logoColor=white)](https://pkg.go.dev/github.com/amacneil/dbmate/v2/pkg/dbmate)
 
 Dbmate is a database migration tool that will keep your database schema in sync across multiple developers and your production servers.
 
@@ -400,8 +400,8 @@ package main
 import (
 	"net/url"
 
-	"github.com/amacneil/dbmate/pkg/dbmate"
-	_ "github.com/amacneil/dbmate/pkg/driver/sqlite"
+	"github.com/amacneil/dbmate/v2/pkg/dbmate"
+	_ "github.com/amacneil/dbmate/v2/pkg/driver/sqlite"
 )
 
 func main() {
@@ -415,7 +415,7 @@ func main() {
 }
 ```
 
-See the [reference documentation](https://pkg.go.dev/github.com/amacneil/dbmate/pkg/dbmate) for more options.
+See the [reference documentation](https://pkg.go.dev/github.com/amacneil/dbmate/v2/pkg/dbmate) for more options.
 
 ### Embedding migrations
 
@@ -431,8 +431,8 @@ import (
 	"fmt"
 	"net/url"
 
-	"github.com/amacneil/dbmate/pkg/dbmate"
-	_ "github.com/amacneil/dbmate/pkg/driver/sqlite"
+	"github.com/amacneil/dbmate/v2/pkg/dbmate"
+	_ "github.com/amacneil/dbmate/v2/pkg/driver/sqlite"
 )
 
 //go:embed db/migrations/*.sql
diff --git a/drivers.go b/drivers.go
index f5fa48f..2cccff0 100644
--- a/drivers.go
+++ b/drivers.go
@@ -1,7 +1,7 @@
 package main
 
 import (
-	_ "github.com/amacneil/dbmate/pkg/driver/clickhouse"
-	_ "github.com/amacneil/dbmate/pkg/driver/mysql"
-	_ "github.com/amacneil/dbmate/pkg/driver/postgres"
+	_ "github.com/amacneil/dbmate/v2/pkg/driver/clickhouse"
+	_ "github.com/amacneil/dbmate/v2/pkg/driver/mysql"
+	_ "github.com/amacneil/dbmate/v2/pkg/driver/postgres"
 )
diff --git a/drivers_cgo.go b/drivers_cgo.go
index 317a2f0..98a36fa 100644
--- a/drivers_cgo.go
+++ b/drivers_cgo.go
@@ -4,5 +4,5 @@
 package main
 
 import (
-	_ "github.com/amacneil/dbmate/pkg/driver/sqlite"
+	_ "github.com/amacneil/dbmate/v2/pkg/driver/sqlite"
 )
diff --git a/go.mod b/go.mod
index 94fa97d..72ee2a3 100644
--- a/go.mod
+++ b/go.mod
@@ -1,4 +1,4 @@
-module github.com/amacneil/dbmate
+module github.com/amacneil/dbmate/v2
 
 go 1.20
 
diff --git a/main.go b/main.go
index b32c594..084cf1e 100644
--- a/main.go
+++ b/main.go
@@ -10,7 +10,7 @@ import (
 	"github.com/joho/godotenv"
 	"github.com/urfave/cli/v2"
 
-	"github.com/amacneil/dbmate/pkg/dbmate"
+	"github.com/amacneil/dbmate/v2/pkg/dbmate"
 )
 
 func main() {
diff --git a/pkg/dbmate/db.go b/pkg/dbmate/db.go
index 92ee4a8..cf1f89c 100644
--- a/pkg/dbmate/db.go
+++ b/pkg/dbmate/db.go
@@ -13,7 +13,7 @@ import (
 	"sort"
 	"time"
 
-	"github.com/amacneil/dbmate/pkg/dbutil"
+	"github.com/amacneil/dbmate/v2/pkg/dbutil"
 )
 
 // Error codes
diff --git a/pkg/dbmate/driver.go b/pkg/dbmate/driver.go
index 4ad2b74..d6f1428 100644
--- a/pkg/dbmate/driver.go
+++ b/pkg/dbmate/driver.go
@@ -5,7 +5,7 @@ import (
 	"io"
 	"net/url"
 
-	"github.com/amacneil/dbmate/pkg/dbutil"
+	"github.com/amacneil/dbmate/v2/pkg/dbutil"
 )
 
 // Driver provides top level database functions
diff --git a/pkg/driver/clickhouse/clickhouse.go b/pkg/driver/clickhouse/clickhouse.go
index f22393e..1bd9304 100644
--- a/pkg/driver/clickhouse/clickhouse.go
+++ b/pkg/driver/clickhouse/clickhouse.go
@@ -10,8 +10,8 @@ import (
 	"sort"
 	"strings"
 
-	"github.com/amacneil/dbmate/pkg/dbmate"
-	"github.com/amacneil/dbmate/pkg/dbutil"
+	"github.com/amacneil/dbmate/v2/pkg/dbmate"
+	"github.com/amacneil/dbmate/v2/pkg/dbutil"
 
 	"github.com/ClickHouse/clickhouse-go/v2"
 )
diff --git a/pkg/driver/mysql/mysql.go b/pkg/driver/mysql/mysql.go
index 8bc277f..21930a9 100644
--- a/pkg/driver/mysql/mysql.go
+++ b/pkg/driver/mysql/mysql.go
@@ -9,8 +9,8 @@ import (
 	"regexp"
 	"strings"
 
-	"github.com/amacneil/dbmate/pkg/dbmate"
-	"github.com/amacneil/dbmate/pkg/dbutil"
+	"github.com/amacneil/dbmate/v2/pkg/dbmate"
+	"github.com/amacneil/dbmate/v2/pkg/dbutil"
 
 	_ "github.com/go-sql-driver/mysql" // database/sql driver
 )
diff --git a/pkg/driver/postgres/postgres.go b/pkg/driver/postgres/postgres.go
index 9282876..a469287 100644
--- a/pkg/driver/postgres/postgres.go
+++ b/pkg/driver/postgres/postgres.go
@@ -9,8 +9,8 @@ import (
 	"runtime"
 	"strings"
 
-	"github.com/amacneil/dbmate/pkg/dbmate"
-	"github.com/amacneil/dbmate/pkg/dbutil"
+	"github.com/amacneil/dbmate/v2/pkg/dbmate"
+	"github.com/amacneil/dbmate/v2/pkg/dbutil"
 
 	"github.com/lib/pq"
 )
diff --git a/pkg/driver/sqlite/sqlite.go b/pkg/driver/sqlite/sqlite.go
index 90b1032..f094e91 100644
--- a/pkg/driver/sqlite/sqlite.go
+++ b/pkg/driver/sqlite/sqlite.go
@@ -13,8 +13,8 @@ import (
 	"regexp"
 	"strings"
 
-	"github.com/amacneil/dbmate/pkg/dbmate"
-	"github.com/amacneil/dbmate/pkg/dbutil"
+	"github.com/amacneil/dbmate/v2/pkg/dbmate"
+	"github.com/amacneil/dbmate/v2/pkg/dbutil"
 
 	"github.com/lib/pq"
 	_ "github.com/mattn/go-sqlite3" // database/sql driver


Test patch:
diff --git a/pkg/dbmate/db_test.go b/pkg/dbmate/db_test.go
index 100558a..9a1ddc9 100644
--- a/pkg/dbmate/db_test.go
+++ b/pkg/dbmate/db_test.go
@@ -8,11 +8,11 @@ import (
 	"testing/fstest"
 	"time"
 
-	"github.com/amacneil/dbmate/pkg/dbmate"
-	"github.com/amacneil/dbmate/pkg/dbutil"
-	_ "github.com/amacneil/dbmate/pkg/driver/mysql"
-	_ "github.com/amacneil/dbmate/pkg/driver/postgres"
-	_ "github.com/amacneil/dbmate/pkg/driver/sqlite"
+	"github.com/amacneil/dbmate/v2/pkg/dbmate"
+	"github.com/amacneil/dbmate/v2/pkg/dbutil"
+	_ "github.com/amacneil/dbmate/v2/pkg/driver/mysql"
+	_ "github.com/amacneil/dbmate/v2/pkg/driver/postgres"
+	_ "github.com/amacneil/dbmate/v2/pkg/driver/sqlite"
 
 	"github.com/stretchr/testify/require"
 	"github.com/zenizh/go-capturer"
diff --git a/pkg/dbutil/dbutil_test.go b/pkg/dbutil/dbutil_test.go
index 113b933..57ceed5 100644
--- a/pkg/dbutil/dbutil_test.go
+++ b/pkg/dbutil/dbutil_test.go
@@ -4,7 +4,7 @@ import (
 	"database/sql"
 	"testing"
 
-	"github.com/amacneil/dbmate/pkg/dbutil"
+	"github.com/amacneil/dbmate/v2/pkg/dbutil"
 
 	_ "github.com/mattn/go-sqlite3" // database/sql driver
 	"github.com/stretchr/testify/require"
diff --git a/pkg/driver/clickhouse/clickhouse_test.go b/pkg/driver/clickhouse/clickhouse_test.go
index ab29d69..ffd7ee0 100644
--- a/pkg/driver/clickhouse/clickhouse_test.go
+++ b/pkg/driver/clickhouse/clickhouse_test.go
@@ -6,8 +6,8 @@ import (
 	"os"
 	"testing"
 
-	"github.com/amacneil/dbmate/pkg/dbmate"
-	"github.com/amacneil/dbmate/pkg/dbutil"
+	"github.com/amacneil/dbmate/v2/pkg/dbmate"
+	"github.com/amacneil/dbmate/v2/pkg/dbutil"
 
 	"github.com/stretchr/testify/require"
 )
diff --git a/pkg/driver/mysql/mysql_test.go b/pkg/driver/mysql/mysql_test.go
index 1aa1d1c..19da89d 100644
--- a/pkg/driver/mysql/mysql_test.go
+++ b/pkg/driver/mysql/mysql_test.go
@@ -6,8 +6,8 @@ import (
 	"os"
 	"testing"
 
-	"github.com/amacneil/dbmate/pkg/dbmate"
-	"github.com/amacneil/dbmate/pkg/dbutil"
+	"github.com/amacneil/dbmate/v2/pkg/dbmate"
+	"github.com/amacneil/dbmate/v2/pkg/dbutil"
 
 	"github.com/stretchr/testify/require"
 )
diff --git a/pkg/driver/postgres/postgres_test.go b/pkg/driver/postgres/postgres_test.go
index fd29f00..9df06cc 100644
--- a/pkg/driver/postgres/postgres_test.go
+++ b/pkg/driver/postgres/postgres_test.go
@@ -7,8 +7,8 @@ import (
 	"runtime"
 	"testing"
 
-	"github.com/amacneil/dbmate/pkg/dbmate"
-	"github.com/amacneil/dbmate/pkg/dbutil"
+	"github.com/amacneil/dbmate/v2/pkg/dbmate"
+	"github.com/amacneil/dbmate/v2/pkg/dbutil"
 
 	"github.com/stretchr/testify/require"
 )
diff --git a/pkg/driver/sqlite/sqlite_test.go b/pkg/driver/sqlite/sqlite_test.go
index 010373d..877f4e3 100644
--- a/pkg/driver/sqlite/sqlite_test.go
+++ b/pkg/driver/sqlite/sqlite_test.go
@@ -8,8 +8,8 @@ import (
 	"os"
 	"testing"
 
-	"github.com/amacneil/dbmate/pkg/dbmate"
-	"github.com/amacneil/dbmate/pkg/dbutil"
+	"github.com/amacneil/dbmate/v2/pkg/dbmate"
+	"github.com/amacneil/dbmate/v2/pkg/dbutil"
 
 	"github.com/stretchr/testify/require"
 )