Actions
action #34525
closedImprove handling of screenshot inserts into the database
Description
Currently the database is throwing errors with insertions to the screenshots table, Since there might be screenshots that are already there, we don't need to add them or change them, and we don't want to waste time figuring out if we do (Database time speaking), is preferred to simply implement postgreSQL specific sentences like ON CONFLICT
clause
This would most likely require to move towards postgreSQL 9.5 at least (And we have version 10 out also already and packaged at obs which is the one where the postgreSQL project points to atm)
2018-04-09 12:35:05 CEST openqa geekotest ERROR: duplicate key value violates unique constraint "screenshots_filename"
2018-04-09 12:35:05 CEST openqa geekotest DETAIL: Key (filename)=(af0/4e2/1ce90e331bdfafa86d652a29b8.png) already exists.
2018-04-09 12:35:05 CEST openqa geekotest STATEMENT: INSERT INTO screenshots ( filename, t_created) VALUES ( $1, $2 ) RETURNING id
2018-04-09 12:35:06 CEST openqa geekotest ERROR: duplicate key value violates unique constraint "screenshots_filename"
2018-04-09 12:35:06 CEST openqa geekotest DETAIL: Key (filename)=(228/607/9ea51a4834202457ecb2760f83.png) already exists.
2018-04-09 12:35:06 CEST openqa geekotest STATEMENT: INSERT INTO screenshots ( filename, t_created) VALUES ( $1, $2 ) RETURNING id
Actions