disable avoid adding networks multiple times

This commit is contained in:
Pascal Fischer
2025-07-04 14:19:13 +02:00
parent 914e58ac75
commit 3931958499

View File

@@ -522,7 +522,9 @@ func MigrateEmbeddedToTable[T any, S any, U any](ctx context.Context, db *gorm.D
}
for _, row := range legacyRows {
if err := tx.Create(
if err := tx.Clauses(clause.OnConflict{
DoNothing: true, // this needs to be removed when the cleanup is enabled
}).Create(
mapperFunc(row),
).Error; err != nil {
return fmt.Errorf("failed to insert id %v: %w", row, err)