Repository navigation
Remplacement de la clé primaire de Collectivité - #2564
Draft
celine-m-s wants to merge 3 commits into
Draft
celine-m-s wants to merge 3 commits into
celine-m-s wants to merge 3 commits into
Conversation
The method finds a matching CommuneProcedure.commune and fills CommuneProcedure.commune_uuid. Because every Commune cannot be found, as some code INSEE don't exist in the database, commune_uuid can be null. It's not a management command because it needs to run just before the field is converted into a foreign key. The class method is not optimized but it's not a problem here. This code will run only once and will be removed.
celine-m-s
force-pushed
the
celinems/1588
branch
from
November 20, 2026 15:12
75ac289 to
1ed9cc7
Compare
celine-m-s
force-pushed
the
celinems/1588
branch
from
November 23, 2026 16:51
97fe15d to
37d1221
Compare
celine-m-s
marked this pull request as ready for review
November 23, 2026 19:33
celine-m-s
force-pushed
the
celinems/abstract_id
branch
from
November 24, 2026 08:10
fa832c7 to
fc61611
Compare
celine-m-s
marked this pull request as draft
November 24, 2026 14:37
celine-m-s
force-pushed
the
celinems/abstract_id
branch
2 times, most recently
from
November 24, 2026 14:48
fb16f26 to
080ec2e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Étapes à travailler.
Collectivite.uuid (dans l'objectif de remplacer Collectivite.id)
CommuneProcedure.commune_uuid. Cet UUID devra dans le futur pointer vers Commune, et non vers Collectivite, mais Commune étant un héritage concret de Collectivite, il ne peut avoir d'ID déclaré.
Référencer les endroits où collectivite.id est utilisé. Créer une nouvelle colonne pour stocker ce uuid dans chaque table.
Changer PK de collectivite vers uuid. Pour chaque autre table : supprimer ancienne colonne et renommer nouvelle (uuid) en id. Les déclarer en foreign key.
Voir :
Collectivité manquante ou erronée créant des problèmes #1533
Certaines procédures ont des collectivites porteuses inexistantes #2328
Collectivité manquante - collectivité porteuse vide #1822