Depending on the column(s) passed to on Conflict, .upsert() allows you to perform the equivalent of .insert() if a row with the corresponding on Conflict columns doesn't exist, or if it does exist, perform an alternative action depending on ignore Duplicates.