Commit 273fecac authored by Andrei Mihu's avatar Andrei Mihu
Browse files

Update 'sql-migrate' dependency.

parent cb0f0004
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -355,14 +355,14 @@
  revision = "05ee40e3a273f7245e8777337fc7b46e533a9a92"

[[projects]]
  digest = "1:c3b2d3c9d09216984d30aa2468dac8fdc6f876a3dce08c08f0e3d22a9ca71957"
  digest = "1:de54c071d521d5adb97ba259392faefffc3b702f08323601fc3a7ac873a717d7"
  name = "github.com/rubenv/sql-migrate"
  packages = [
    ".",
    "sqlparse",
  ]
  pruneopts = ""
  revision = "3f452fc0ebebbb784fdab91f7bc79a31dcacab5c"
  revision = "5a8808c14925f69d2228981db113f672ad047e69"

[[projects]]
  branch = "master"
+1 −1
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@

[[constraint]]
  name = "github.com/rubenv/sql-migrate"
  revision = "3f452fc0ebebbb784fdab91f7bc79a31dcacab5c"
  revision = "5a8808c14925f69d2228981db113f672ad047e69"

[[constraint]]
  name = "github.com/lib/pq"
+3 −1
Original line number Diff line number Diff line
@@ -3,9 +3,9 @@ language: go
sudo: false

go:
    - "1.8"
    - "1.9"
    - "1.10"
    - "1.11"

services:
    - mysql
@@ -19,6 +19,7 @@ before_install:
install:
    - go get -t ./...
    - go install ./...
    - go get -u github.com/kisielk/errcheck

script:
    - go test -v ./...
@@ -27,3 +28,4 @@ script:
    - bash test-integration/mysql-flag.sh
    - bash test-integration/mysql-env.sh
    - bash test-integration/sqlite.sh
    - errcheck ./...
+3 −1
Original line number Diff line number Diff line
@@ -16,7 +16,9 @@ func bindata_read(data []byte, name string) ([]byte, error) {

	var buf bytes.Buffer
	_, err = io.Copy(&buf, gz)
	gz.Close()
	if err := gz.Close(); err != nil {
		return nil, err
	}

	if err != nil {
		return nil, fmt.Errorf("Read %q: %v", name, err)
+11 −7
Original line number Diff line number Diff line
@@ -280,7 +280,7 @@ func (a AssetMigrationSource) FindMigrations() ([]*Migration, error) {
// packr.Box that we need.
type PackrBox interface {
	List() []string
	Bytes(name string) []byte
	Find(name string) ([]byte, error)
}

// Migrations from a packr box.
@@ -313,7 +313,10 @@ func (p PackrMigrationSource) FindMigrations() ([]*Migration, error) {
		}

		if strings.HasSuffix(name, ".sql") {
			file := p.Box.Bytes(item)
			file, err := p.Box.Find(item)
			if err != nil {
				return nil, err
			}

			migration, err := ParseMigration(name, bytes.NewReader(file))
			if err != nil {
@@ -391,7 +394,7 @@ func ExecMax(db *sql.DB, dialect string, m MigrationSource, dir MigrationDirecti
		for _, stmt := range migration.Queries {
			if _, err := executor.Exec(stmt); err != nil {
				if trans, ok := executor.(*gorp.Transaction); ok {
					trans.Rollback()
					_ = trans.Rollback()
				}

				return applied, newTxError(migration, err)
@@ -406,7 +409,7 @@ func ExecMax(db *sql.DB, dialect string, m MigrationSource, dir MigrationDirecti
			})
			if err != nil {
				if trans, ok := executor.(*gorp.Transaction); ok {
					trans.Rollback()
					_ = trans.Rollback()
				}

				return applied, newTxError(migration, err)
@@ -417,7 +420,7 @@ func ExecMax(db *sql.DB, dialect string, m MigrationSource, dir MigrationDirecti
			})
			if err != nil {
				if trans, ok := executor.(*gorp.Transaction); ok {
					trans.Rollback()
					_ = trans.Rollback()
				}

				return applied, newTxError(migration, err)
@@ -548,7 +551,7 @@ func SkipMax(db *sql.DB, dialect string, m MigrationSource, dir MigrationDirecti
		})
		if err != nil {
			if trans, ok := executor.(*gorp.Transaction); ok {
				trans.Rollback()
				_ = trans.Rollback()
			}

			return applied, newTxError(migration, err)
@@ -647,7 +650,8 @@ func getMigrationDbMap(db *sql.DB, dialect string) (*gorp.DbMap, error) {
		err := db.QueryRow("SELECT NOW()").Scan(&out)
		if err != nil {
			if err.Error() == "sql: Scan error on column index 0: unsupported driver -> Scan pair: []uint8 -> *time.Time" ||
				err.Error() == "sql: Scan error on column index 0: unsupported Scan, storing driver.Value type []uint8 into type *time.Time" {
				err.Error() == "sql: Scan error on column index 0: unsupported Scan, storing driver.Value type []uint8 into type *time.Time" ||
				err.Error() == "sql: Scan error on column index 0, name \"NOW()\": unsupported Scan, storing driver.Value type []uint8 into type *time.Time" {
				return nil, errors.New(`Cannot parse dates.

Make sure that the parseTime option is supplied to your database connection.
Loading