Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

Add the missing commit in FindMigrationHistoryList

天舟8e0ce6e2df98
diff --git a/plugin/db/mysql.go b/plugin/db/mysql.go
index 80d0520a90..c4a485bbe1 100644
--- a/plugin/db/mysql.go
+++ b/plugin/db/mysql.go
@@ -568,7 +568,9 @@ func (driver *MySQLDriver) ExecuteMigration(ctx context.Context, m *MigrationInf
return formatErrorWithQuery(err, query)
}
- tx.Commit()
+ if err := tx.Commit(); err != nil {
+ return err
+ }
return nil
}
@@ -645,6 +647,10 @@ func (driver *MySQLDriver) FindMigrationHistoryList(ctx context.Context, find *M
return nil, err
}
+ if err := tx.Commit(); err != nil {
+ return nil, err
+ }
+
return list, nil
}