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

[TECH] ajoute une contrainte d'unicité pour campaignParticipationId sur knowledge-element-snapshot (pix-17358) #11964

Conversation

lionelB
Copy link
Member

@lionelB lionelB commented Apr 3, 2025

🌸 Problème

Il existe des fois où un snashot peut être créer 2 fois pour la même participation.

🌳 Proposition

On ajoute une contrainte d'unicité pour éviter cela

🐝 Remarques

Cette contrainte a été déjà ajouté en prod, d’où la vérification de son existance dans le up

🤧 Pour tester

  • se connecter sur scalingo
  • lancer la commande npm run db:rollback:latest pour supprimer la contrainte
  • lancer le script d'ajout de contrainte
node src/prescription/scripts/add-unicity-constraint-knwoledge-element-snapshots.js --dryRun false
  • lancer la commande npm run db:migrate pour jouer la contrainte

@lionelB lionelB requested a review from a team as a code owner April 3, 2025 15:56
@pix-bot-github
Copy link

Une fois les applications déployées, elles seront accessibles via les liens suivants :

Les variables d'environnement seront accessibles via les liens suivants :

@xav-car xav-car added Tech Review OK 👀 Func Review Needed Need PO validation for this functionally and removed 👀 Tech Review Needed 👀 Func Review Needed Need PO validation for this functionally labels Apr 4, 2025
Copy link
Contributor

@BerengereC BerengereC left a comment

Choose a reason for hiding this comment

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

Petite typo dans le nom de fichier

@xav-car xav-car force-pushed the pix-17358/add-campaignp-participation-id-unicity-constraint-on-snapshot branch from 2ac0d20 to 9325582 Compare April 4, 2025 08:16
@xav-car
Copy link
Contributor

xav-car commented Apr 4, 2025

Petite typo dans le nom de fichier

c'est étonnant 😅

@theotime2005 theotime2005 added 🚀 Ready to Merge Func Review OK PO validated functionally the PR and removed 👀 Func Review Needed Need PO validation for this functionally labels Apr 4, 2025
@pix-service-auto-merge pix-service-auto-merge force-pushed the pix-17358/add-campaignp-participation-id-unicity-constraint-on-snapshot branch from 9325582 to 1d5df72 Compare April 4, 2025 08:25
@pix-service-auto-merge pix-service-auto-merge force-pushed the pix-17358/add-campaignp-participation-id-unicity-constraint-on-snapshot branch from 1d5df72 to 6c05c26 Compare April 4, 2025 11:58
@pix-service-auto-merge pix-service-auto-merge merged commit b79f127 into dev Apr 4, 2025
9 of 11 checks passed
@pix-service-auto-merge pix-service-auto-merge deleted the pix-17358/add-campaignp-participation-id-unicity-constraint-on-snapshot branch April 4, 2025 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants