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)