We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents bf67ee9 + e2ff20a commit b52e82dCopy full SHA for b52e82d
stores/wallet.go
@@ -10,6 +10,7 @@ import (
10
"go.sia.tech/renterd/wallet"
11
"go.sia.tech/siad/modules"
12
"gorm.io/gorm"
13
+ "gorm.io/gorm/clause"
14
)
15
16
type (
@@ -329,7 +330,11 @@ func applyUnappliedOutputRemovals(tx *gorm.DB, oid hash256) error {
329
330
}
331
332
func applyUnappliedTxnAdditions(tx *gorm.DB, txn dbTransaction) error {
- return tx.Create(&txn).Error
333
+ return tx.Clauses(clause.OnConflict{
334
+ Columns: []clause.Column{{Name: "transaction_id"}},
335
+ UpdateAll: true,
336
+ }).
337
+ Create(&txn).Error
338
339
340
func applyUnappliedTxnRemovals(tx *gorm.DB, txnID hash256) error {
0 commit comments