- Reverted repository from dimag-jfrog to mattes to prepare for pull request

This commit is contained in:
dimag 2017-01-07 16:16:00 +02:00
parent dec52a778f
commit 34a3e58ab9
23 changed files with 69 additions and 69 deletions

View File

@ -1,6 +1,6 @@
go: &go
image: golang
working_dir: /go/src/github.com/dimag-jfrog/migrate
working_dir: /go/src/github.com/mattes/migrate
volumes:
- $GOPATH:/go
go-test:

View File

@ -2,8 +2,8 @@
package bash
import (
"github.com/dimag-jfrog/migrate/driver"
"github.com/dimag-jfrog/migrate/file"
"github.com/mattes/migrate/driver"
"github.com/mattes/migrate/file"
)
type Driver struct {

View File

@ -9,9 +9,9 @@ import (
"time"
"github.com/gocql/gocql"
"github.com/dimag-jfrog/migrate/driver"
"github.com/dimag-jfrog/migrate/file"
"github.com/dimag-jfrog/migrate/migrate/direction"
"github.com/mattes/migrate/driver"
"github.com/mattes/migrate/file"
"github.com/mattes/migrate/migrate/direction"
)
type Driver struct {

View File

@ -7,9 +7,9 @@ import (
"time"
"github.com/gocql/gocql"
"github.com/dimag-jfrog/migrate/file"
"github.com/dimag-jfrog/migrate/migrate/direction"
pipep "github.com/dimag-jfrog/migrate/pipe"
"github.com/mattes/migrate/file"
"github.com/mattes/migrate/migrate/direction"
pipep "github.com/mattes/migrate/pipe"
)
func TestMigrate(t *testing.T) {

View File

@ -5,7 +5,7 @@ import (
"fmt"
neturl "net/url" // alias to allow `url string` func signature in New
"github.com/dimag-jfrog/migrate/file"
"github.com/mattes/migrate/file"
)
// Driver is the interface type that needs to implemented by all drivers.

View File

@ -10,7 +10,7 @@
## Usage in Go
```go
import "github.com/dimag-jfrog/migrate/migrate"
import "github.com/mattes/migrate/migrate"
// Import your migration methods package so that they are registered and available for the MongoDB driver.
// There is no need to import the MongoDB driver explicitly, as it should already be imported by your migration methods package.
@ -59,14 +59,14 @@ V001_some_migration_operation_down
## Methods registration
For a detailed example see: [sample_mongodb_migrator.go](https://github.com/dimag-jfrog/migrate/blob/master/driver/mongodb/example/sample_mongdb_migrator.go)
For a detailed example see: [sample_mongodb_migrator.go](https://github.com/mattes/migrate/blob/master/driver/mongodb/example/sample_mongdb_migrator.go)
```go
package my_mongo_db_migrator
import (
"github.com/dimag-jfrog/migrate/driver/mongodb"
"github.com/dimag-jfrog/migrate/driver/mongodb/gomethods"
"github.com/mattes/migrate/driver/mongodb"
"github.com/mattes/migrate/driver/mongodb/gomethods"
"gopkg.in/mgo.v2"
)

View File

@ -3,13 +3,13 @@ package example
import (
"testing"
"github.com/dimag-jfrog/migrate/file"
"github.com/dimag-jfrog/migrate/migrate/direction"
"github.com/mattes/migrate/file"
"github.com/mattes/migrate/migrate/direction"
"github.com/dimag-jfrog/migrate/driver"
"github.com/dimag-jfrog/migrate/driver/mongodb"
"github.com/dimag-jfrog/migrate/driver/mongodb/gomethods"
pipep "github.com/dimag-jfrog/migrate/pipe"
"github.com/mattes/migrate/driver"
"github.com/mattes/migrate/driver/mongodb"
"github.com/mattes/migrate/driver/mongodb/gomethods"
pipep "github.com/mattes/migrate/pipe"
"os"
"reflect"
"time"

View File

@ -1,13 +1,13 @@
package example
import (
"github.com/dimag-jfrog/migrate/driver/mongodb/gomethods"
_ "github.com/dimag-jfrog/migrate/driver/mongodb/gomethods"
"github.com/mattes/migrate/driver/mongodb/gomethods"
_ "github.com/mattes/migrate/driver/mongodb/gomethods"
"gopkg.in/mgo.v2"
"gopkg.in/mgo.v2/bson"
"time"
"github.com/dimag-jfrog/migrate/driver/mongodb"
"github.com/mattes/migrate/driver/mongodb"
)
type SampleMongoDbMigrator struct {

View File

@ -3,8 +3,8 @@ package gomethods
import (
"bufio"
"fmt"
"github.com/dimag-jfrog/migrate/driver"
"github.com/dimag-jfrog/migrate/file"
"github.com/mattes/migrate/driver"
"github.com/mattes/migrate/file"
"os"
"path"
"strings"

View File

@ -4,10 +4,10 @@ import (
"reflect"
"testing"
"github.com/dimag-jfrog/migrate/file"
"github.com/dimag-jfrog/migrate/migrate/direction"
"github.com/mattes/migrate/file"
"github.com/mattes/migrate/migrate/direction"
pipep "github.com/dimag-jfrog/migrate/pipe"
pipep "github.com/mattes/migrate/pipe"
)
type FakeGoMethodsInvoker struct {

View File

@ -2,7 +2,7 @@ package gomethods
import (
"fmt"
"github.com/dimag-jfrog/migrate/driver"
"github.com/mattes/migrate/driver"
"sync"
)

View File

@ -2,10 +2,10 @@ package mongodb
import (
"errors"
"github.com/dimag-jfrog/migrate/driver"
"github.com/dimag-jfrog/migrate/driver/mongodb/gomethods"
"github.com/dimag-jfrog/migrate/file"
"github.com/dimag-jfrog/migrate/migrate/direction"
"github.com/mattes/migrate/driver"
"github.com/mattes/migrate/driver/mongodb/gomethods"
"github.com/mattes/migrate/file"
"github.com/mattes/migrate/migrate/direction"
"gopkg.in/mgo.v2"
"gopkg.in/mgo.v2/bson"
"reflect"

View File

@ -12,9 +12,9 @@ import (
"strings"
"github.com/go-sql-driver/mysql"
"github.com/dimag-jfrog/migrate/driver"
"github.com/dimag-jfrog/migrate/file"
"github.com/dimag-jfrog/migrate/migrate/direction"
"github.com/mattes/migrate/driver"
"github.com/mattes/migrate/file"
"github.com/mattes/migrate/migrate/direction"
)
type Driver struct {

View File

@ -6,9 +6,9 @@ import (
"strings"
"testing"
"github.com/dimag-jfrog/migrate/file"
"github.com/dimag-jfrog/migrate/migrate/direction"
pipep "github.com/dimag-jfrog/migrate/pipe"
"github.com/mattes/migrate/file"
"github.com/mattes/migrate/migrate/direction"
pipep "github.com/mattes/migrate/pipe"
)
// TestMigrate runs some additional tests on Migrate().

View File

@ -8,9 +8,9 @@ import (
"strconv"
"github.com/lib/pq"
"github.com/dimag-jfrog/migrate/driver"
"github.com/dimag-jfrog/migrate/file"
"github.com/dimag-jfrog/migrate/migrate/direction"
"github.com/mattes/migrate/driver"
"github.com/mattes/migrate/file"
"github.com/mattes/migrate/migrate/direction"
)
type Driver struct {

View File

@ -5,9 +5,9 @@ import (
"os"
"testing"
"github.com/dimag-jfrog/migrate/file"
"github.com/dimag-jfrog/migrate/migrate/direction"
pipep "github.com/dimag-jfrog/migrate/pipe"
"github.com/mattes/migrate/file"
"github.com/mattes/migrate/migrate/direction"
pipep "github.com/mattes/migrate/pipe"
)
// TestMigrate runs some additional tests on Migrate().

View File

@ -7,9 +7,9 @@ import (
"fmt"
"strings"
"github.com/dimag-jfrog/migrate/driver"
"github.com/dimag-jfrog/migrate/file"
"github.com/dimag-jfrog/migrate/migrate/direction"
"github.com/mattes/migrate/driver"
"github.com/mattes/migrate/file"
"github.com/mattes/migrate/migrate/direction"
"github.com/mattn/go-sqlite3"
)

View File

@ -4,9 +4,9 @@ import (
"database/sql"
"testing"
"github.com/dimag-jfrog/migrate/file"
"github.com/dimag-jfrog/migrate/migrate/direction"
pipep "github.com/dimag-jfrog/migrate/pipe"
"github.com/mattes/migrate/file"
"github.com/mattes/migrate/migrate/direction"
pipep "github.com/mattes/migrate/pipe"
)
// TestMigrate runs some additional tests on Migrate()

View File

@ -5,7 +5,7 @@ import (
"bytes"
"errors"
"fmt"
"github.com/dimag-jfrog/migrate/migrate/direction"
"github.com/mattes/migrate/migrate/direction"
"go/token"
"io/ioutil"
"path"

View File

@ -1,7 +1,7 @@
package file
import (
"github.com/dimag-jfrog/migrate/migrate/direction"
"github.com/mattes/migrate/migrate/direction"
"io/ioutil"
"os"
"path"

20
main.go
View File

@ -1,6 +1,6 @@
// Package main is the CLI.
// You can use the CLI via Terminal.
// import "github.com/dimag-jfrog/migrate/migrate" for usage within Go.
// import "github.com/mattes/migrate/migrate" for usage within Go.
package main
import (
@ -11,15 +11,15 @@ import (
"time"
"github.com/fatih/color"
_ "github.com/dimag-jfrog/migrate/driver/bash"
_ "github.com/dimag-jfrog/migrate/driver/cassandra"
_ "github.com/dimag-jfrog/migrate/driver/mysql"
_ "github.com/dimag-jfrog/migrate/driver/postgres"
_ "github.com/dimag-jfrog/migrate/driver/sqlite3"
"github.com/dimag-jfrog/migrate/file"
"github.com/dimag-jfrog/migrate/migrate"
"github.com/dimag-jfrog/migrate/migrate/direction"
pipep "github.com/dimag-jfrog/migrate/pipe"
_ "github.com/mattes/migrate/driver/bash"
_ "github.com/mattes/migrate/driver/cassandra"
_ "github.com/mattes/migrate/driver/mysql"
_ "github.com/mattes/migrate/driver/postgres"
_ "github.com/mattes/migrate/driver/sqlite3"
"github.com/mattes/migrate/file"
"github.com/mattes/migrate/migrate"
"github.com/mattes/migrate/migrate/direction"
pipep "github.com/mattes/migrate/pipe"
)
var url = flag.String("url", os.Getenv("MIGRATE_URL"), "")

View File

@ -11,10 +11,10 @@ import (
"strconv"
"strings"
"github.com/dimag-jfrog/migrate/driver"
"github.com/dimag-jfrog/migrate/file"
"github.com/dimag-jfrog/migrate/migrate/direction"
pipep "github.com/dimag-jfrog/migrate/pipe"
"github.com/mattes/migrate/driver"
"github.com/mattes/migrate/file"
"github.com/mattes/migrate/migrate/direction"
pipep "github.com/mattes/migrate/pipe"
)
// Up applies all available migrations

View File

@ -6,8 +6,8 @@ import (
"testing"
// Ensure imports for each driver we wish to test
_ "github.com/dimag-jfrog/migrate/driver/postgres"
_ "github.com/dimag-jfrog/migrate/driver/sqlite3"
_ "github.com/mattes/migrate/driver/postgres"
_ "github.com/mattes/migrate/driver/sqlite3"
)
// Add Driver URLs here to test basic Up, Down, .. functions.