phase 2: mattes/migrate -> migratex (#848)

* move mattes migrations to migratex

* changes format of migrations to migratex format
* updates test runner to use new interface (double checked this with printlns,
the tests go fully down and then up, and work on pg/mysql)

* remove mattes/migrate

* update tests from deps

* update readme

* fix other file extensions
This commit is contained in:
Reed Allman
2018-03-13 14:12:34 -07:00
committed by GitHub
parent 1f43545b63
commit 4084b727c0
697 changed files with 16924 additions and 35406 deletions

View File

@@ -96,8 +96,7 @@ func ConcatJSON(blobs ...[]byte) []byte {
last := len(blobs) - 1
var opening, closing byte
a := 0
idx := 0
var idx, a int
buf := bytes.NewBuffer(nil)
for i, b := range blobs {

View File

@@ -19,7 +19,6 @@ import (
"io/ioutil"
"log"
"net/http"
"net/url"
"path/filepath"
"strings"
"time"
@@ -45,7 +44,10 @@ func LoadStrategy(path string, local, remote func(string) ([]byte, error)) func(
return remote
}
return func(pth string) ([]byte, error) {
upth, _ := url.PathUnescape(pth)
upth, err := pathUnescape(pth)
if err != nil {
return nil, err
}
return local(filepath.FromSlash(upth))
}
}

9
vendor/github.com/go-openapi/swag/post_go18.go generated vendored Normal file
View File

@@ -0,0 +1,9 @@
// +build go1.8
package swag
import "net/url"
func pathUnescape(path string) (string, error) {
return url.PathUnescape(path)
}

9
vendor/github.com/go-openapi/swag/pre_go18.go generated vendored Normal file
View File

@@ -0,0 +1,9 @@
// +build !go1.8
package swag
import "net/url"
func pathUnescape(path string) (string, error) {
return url.QueryUnescape(path)
}

View File

@@ -42,6 +42,7 @@ func YAMLToJSON(data interface{}) (json.RawMessage, error) {
return json.RawMessage(b), err
}
// BytesToYAMLDoc converts a byte slice into a YAML document
func BytesToYAMLDoc(data []byte) (interface{}, error) {
var canary map[interface{}]interface{} // validate this is an object and not a different type
if err := yaml.Unmarshal(data, &canary); err != nil {