fixing panic when a transaction can't be open

Signed-off-by: Pichugin Dmitry <pichugin.dmitry.v@gmail.com>
This commit is contained in:
Pichugin Dmitry 2019-05-26 09:53:19 +03:00
parent 799fcfb84b
commit cfa2c3979d

View File

@ -23,7 +23,7 @@ func runSQLMigration(db *sql.DB, statements []string, useTx bool, v int64, direc
tx, err := db.Begin()
if err != nil {
errors.Wrap(err, "failed to begin transaction")
return errors.Wrap(err, "failed to begin transaction")
}
for _, query := range statements {