mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-01 09:02:24 -05:00
[chore] Update a bunch of database dependencies (#1772)
* [chore] Update a bunch of database dependencies * fix lil thing
This commit is contained in:
parent
66df974143
commit
ec325fee14
402 changed files with 35068 additions and 35401 deletions
12
vendor/github.com/uptrace/bun/migrate/migration.go
generated
vendored
12
vendor/github.com/uptrace/bun/migrate/migration.go
generated
vendored
|
|
@ -97,10 +97,15 @@ func Exec(ctx context.Context, db *bun.DB, f io.Reader, isTx bool) error {
|
|||
}
|
||||
|
||||
var retErr error
|
||||
var execErr error
|
||||
|
||||
defer func() {
|
||||
if tx, ok := idb.(bun.Tx); ok {
|
||||
retErr = tx.Commit()
|
||||
if execErr != nil {
|
||||
retErr = tx.Rollback()
|
||||
} else {
|
||||
retErr = tx.Commit()
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
|
@ -113,8 +118,9 @@ func Exec(ctx context.Context, db *bun.DB, f io.Reader, isTx bool) error {
|
|||
}()
|
||||
|
||||
for _, q := range queries {
|
||||
if _, err := idb.ExecContext(ctx, q); err != nil {
|
||||
return err
|
||||
_, execErr = idb.ExecContext(ctx, q)
|
||||
if execErr != nil {
|
||||
return execErr
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue