Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor all Service Module's Postgres queries to replace UPDATE queries with INSERT and SELECT #285

Conversation

baha-a
Copy link
Contributor

@baha-a baha-a commented May 15, 2024

@baha-a baha-a requested a review from 1AhmedYasser May 15, 2024 05:59
Copy link

sonarcloud bot commented May 15, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@@ -1,6 +1,2 @@
INSERT INTO services (name, description, service_id, ruuter_type, is_common, structure)
VALUES (:name, :description, :service_id, :ruuter_type::ruuter_request_type, :is_common, :structure::json)
ON CONFLICT (service_id) DO UPDATE
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This imported, because the service_id is auto generated, it can have conflicts

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The service_id is not auto-generated, it's defined as TEXT, plus, I've removed the unique constraint on it in pull request #282, As a result, we can now insert multiple service_id with the same value.

@turnerrainer turnerrainer merged commit 2f79a57 into buerokratt:dev May 24, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor all Service Module's Postgres queries to replace UPDATE queries with INSERT and SELECT
3 participants