-
Notifications
You must be signed in to change notification settings - Fork 207
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix "duplicate key value violates unique constraint" on needle updates
* Use raw SQL queries with "ON CONFLICT DO NOTHING" to avoid running into those errors * Follow example from `OpenQA::Schema::ResultSet::Assets::register` where we already use raw queries like that followed by an DBIx call to get the newly inserted row * Not using `{for => 'update'}` here to locking as we likely don't need it here as we don't mind the *exact* last module * Avoid repeated function calls simplifying the code a little bit * See https://progress.opensuse.org/issues/153616
- Loading branch information
Showing
1 changed file
with
49 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters