Skip to content

Commit

Permalink
Merge branch 'staging' into 1526
Browse files Browse the repository at this point in the history
  • Loading branch information
Perrine Letellier committed Feb 3, 2025
2 parents df370f2 + 267dd33 commit 2fb50cd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions data/models/teleicare_history/ica_declaration.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,11 @@ class Meta:


class IcaPopulationCibleDeclaree(models.Model):
vrsdecl_ident = models.IntegerField()
vrsdecl_ident = models.IntegerField(
primary_key=True
) # ce champ n'est en réalité pas une primary key, car la primary key est composite.
# Django ne permet pas de créer des clés composites et nécessite la création d'un champ id, si ce champ n'est pas spécifié comme primary_key
# Comme le modèle est unmanaged, cette contrainte ne change rien en BDD
popcbl_ident = models.IntegerField()
vrspcb_popcible_autre = models.TextField(blank=True, null=True)

Expand All @@ -111,7 +115,7 @@ class Meta:


class IcaPopulationRisqueDeclaree(models.Model):
vrsdecl_ident = models.IntegerField()
vrsdecl_ident = models.IntegerField(primary_key=True) # idem IcaPopulationCibleDeclaree
poprs_ident = models.IntegerField()
vrsprs_poprisque_autre = models.TextField(blank=True, null=True)

Expand All @@ -122,7 +126,7 @@ class Meta:


class IcaEffetDeclare(models.Model):
vrsdecl_ident = models.IntegerField()
vrsdecl_ident = models.IntegerField(primary_key=True) # idem IcaPopulationCibleDeclaree
objeff_ident = models.IntegerField()
vrs_autre_objectif = models.TextField(blank=True, null=True)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class Meta:


class IcaSubstanceDeclaree(models.Model):
vrsdecl_ident = models.IntegerField()
vrsdecl_ident = models.IntegerField(primary_key=True) # idem IcaPopulationCibleDeclaree
sbsact_ident = models.IntegerField()
sbsact_commentaires = models.TextField(blank=True, null=True)
sbsactdecl_quantite_par_djr = models.FloatField(blank=True, null=True)
Expand Down

0 comments on commit 2fb50cd

Please sign in to comment.