From c29fa176d43a708054dc06075eeebf88daf502a8 Mon Sep 17 00:00:00 2001 From: Tsiry Sandratraina Date: Mon, 8 Dec 2025 09:27:06 +0300 Subject: [PATCH] ignore conflict on sha256 --- crates/pgpull/src/repo/album.rs | 2 +- crates/pgpull/src/repo/artist.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/pgpull/src/repo/album.rs b/crates/pgpull/src/repo/album.rs index 10e9b1c8..372b7be6 100644 --- a/crates/pgpull/src/repo/album.rs +++ b/crates/pgpull/src/repo/album.rs @@ -62,7 +62,7 @@ pub async fn insert_album(pool: &Pool, album: &Album) -> Result<(), Er artist_uri, xata_createdat ) VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14) - ON CONFLICT (xata_id) DO NOTHING"#, + ON CONFLICT (sha256) DO NOTHING"#, ) .bind(&album.xata_id) .bind(&album.title) diff --git a/crates/pgpull/src/repo/artist.rs b/crates/pgpull/src/repo/artist.rs index 7e221191..b6b6e1d6 100644 --- a/crates/pgpull/src/repo/artist.rs +++ b/crates/pgpull/src/repo/artist.rs @@ -37,7 +37,7 @@ pub async fn insert_artist(pool: &Pool, artist: &Artist) -> Result<(), genres, xata_createdat ) VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15) - ON CONFLICT (xata_id) DO NOTHING"#, + ON CONFLICT (sha256) DO NOTHING"#, ) .bind(&artist.xata_id) .bind(&artist.name) -- 2.51.2