Permalink
Browse files

diff/push: Fix all remaining bugs in column reordering

This commit updates dep github.com/skeema/tengo, to bring in the new algorithm
for optimal handling of column reordering. This fixes edge cases where an error
was generated under certain combinations of column reordering.

This commit also improves error reporting for situations in which verifyDiff
encounters invalid SQL.
  • Loading branch information...
evanelias committed Sep 4, 2018
1 parent 406a941 commit 4b4815c2b46fe87aad35e5ae44e2d0a1d45b3e7d
Showing with 70 additions and 101 deletions.
  1. +2 −2 Gopkg.lock
  2. +1 −1 skeema.go
  3. +1 −1 target.go
  4. +66 −97 vendor/github.com/skeema/tengo/table.go
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View
@@ -14,7 +14,7 @@ schema to the filesystem, and apply online schema changes by modifying files.`
// Globals overridden by GoReleaser's ldflags
var (
version = "1.0.4-dev"
version = "1.0.5-dev"
commit = "unknown"
date = "unknown"
)
View
@@ -301,7 +301,7 @@ func (t *Target) verifyDiff(diff *tengo.SchemaDiff) (err error) {
}
for _, stmt := range v.Alters {
if _, err := db.Exec(stmt); err != nil {
return err
return fmt.Errorf("verifyDiff: %s (returned from executing DDL in temporary schema: %s)", err, stmt)
}
}
expected, _ := tengo.ParseCreateAutoInc(v.To.CreateStatement)

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

0 comments on commit 4b4815c

Please sign in to comment.