Skip to content

Commit

Permalink
Merge pull request #140 from kudos-ink/refactor-allow-duplicate-repos…
Browse files Browse the repository at this point in the history
…itory

refactor: allow a repository to be associated with multiple projects
  • Loading branch information
CJ13th authored Oct 31, 2024
2 parents 5065916 + d94a8bc commit 13ed298
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/shared/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,9 @@ impl Repository {
let query_string = r#"
INSERT INTO repositories (slug, name, url, language_slug, project_id)
VALUES ($1, $2, $3, $4, $5)
ON CONFLICT (url)
ON CONFLICT (url, slug, project_id)
DO UPDATE SET
slug = EXCLUDED.slug,
name = EXCLUDED.name,
project_id = EXCLUDED.project_id,
language_slug = EXCLUDED.language_slug
RETURNING id;
"#;
Expand Down

0 comments on commit 13ed298

Please sign in to comment.