a
This commit is contained in:
parent
cc246ee6fb
commit
9cffbbef74
1 changed files with 1 additions and 1 deletions
|
|
@ -96,7 +96,7 @@ func AnnunciInsert(annunci typesdefs.AnnunciParsed, resetAllBeforeUpdate bool, i
|
|||
to_insert = append(to_insert, value)
|
||||
}
|
||||
if len(to_insert) > 0 {
|
||||
stmt := Annunci.INSERT(Annunci.MutableColumns).MODELS(to_insert).ON_CONFLICT(Annunci.Codice).DO_UPDATE(SET(Annunci.MutableColumns.SET(Annunci.EXCLUDED.MutableColumns)))
|
||||
stmt := Annunci.INSERT(Annunci.MutableColumns).MODELS(to_insert).ON_CONFLICT(Annunci.ID).DO_UPDATE(SET(Annunci.MutableColumns.SET(Annunci.EXCLUDED.MutableColumns))).ON_CONFLICT(Annunci.Codice).DO_UPDATE(SET(Annunci.MutableColumns.SET(Annunci.EXCLUDED.MutableColumns)))
|
||||
if isDryRun {
|
||||
log.Printf("Dry run: would have inserted %d records\n", len(to_insert))
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue