fix(db): remove extraneous conflict handling in workflow image records

This commit is contained in:
psychedelicious 2023-10-19 07:37:28 +11:00
parent 301a8fef92
commit 2f4f83280b

View File

@ -85,10 +85,9 @@ class SqliteWorkflowImageRecordsStorage(WorkflowImageRecordsStorageBase):
self._cursor.execute( self._cursor.execute(
"""--sql """--sql
INSERT INTO workflow_images (workflow_id, image_name) INSERT INTO workflow_images (workflow_id, image_name)
VALUES (?, ?) VALUES (?, ?);
ON CONFLICT (image_name) DO UPDATE SET workflow_id = ?;
""", """,
(workflow_id, image_name, workflow_id), (workflow_id, image_name),
) )
self._conn.commit() self._conn.commit()
except sqlite3.Error as e: except sqlite3.Error as e: