-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
prescribers: Rename PE into FT in database
- Loading branch information
Showing
13 changed files
with
1,394 additions
and
1,181 deletions.
There are no files selected for viewing
136 changes: 136 additions & 0 deletions
136
.../approvals/migrations/0010_alter_approval_origin_prescriber_organization_kind_and_more.py
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,136 @@ | ||
# Generated by Django 5.1.5 on 2025-02-04 13:21 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
def update_cancelled_approvals(apps, schema_editor): | ||
CancelledApproval = apps.get_model("approvals", "CancelledApproval") | ||
CancelledApproval.objects.filter(origin_prescriber_organization_kind="PE").update( | ||
origin_prescriber_organization_kind="FT" | ||
) | ||
|
||
|
||
def update_approvals(apps, schema_editor): | ||
Approval = apps.get_model("approvals", "Approval") | ||
Approval.objects.filter(origin_prescriber_organization_kind="PE").update(origin_prescriber_organization_kind="FT") | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("approvals", "0009_alter_approval_public_id"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="approval", | ||
name="origin_prescriber_organization_kind", | ||
field=models.CharField( | ||
choices=[ | ||
("AFPA", "AFPA - Agence nationale pour la formation professionnelle des adultes"), | ||
("ASE", "ASE - Aide sociale à l'enfance"), | ||
("Orienteur", "Autre organisation (orienteur)"), | ||
( | ||
"CAARUD", | ||
"CAARUD - Centre d'accueil et d'accompagnement à la réduction de risques pour usagers de" | ||
" drogues", | ||
), | ||
("CADA", "CADA - Centre d'accueil de demandeurs d'asile"), | ||
("CAF", "CAF - Caisse d'allocations familiales"), | ||
("CAP_EMPLOI", "Cap emploi"), | ||
("CAVA", "CAVA - Centre d'adaptation à la vie active"), | ||
("CCAS", "CCAS - Centre communal d'action sociale ou centre intercommunal d'action sociale"), | ||
("CHRS", "CHRS - Centre d'hébergement et de réinsertion sociale"), | ||
("CHU", "CHU - Centre d'hébergement d'urgence"), | ||
("CIDFF", "CIDFF - Centre d'information sur les droits des femmes et des familles"), | ||
("CPH", "CPH - Centre provisoire d'hébergement"), | ||
("CSAPA", "CSAPA - Centre de soins, d'accompagnement et de prévention en addictologie"), | ||
("E2C", "E2C - École de la deuxième chance"), | ||
("EPIDE", "EPIDE - Établissement pour l'insertion dans l'emploi"), | ||
("FT", "France Travail"), | ||
("HUDA", "HUDA - Hébergement d'urgence pour demandeurs d'asile"), | ||
("ML", "Mission locale"), | ||
("MSA", "MSA - Mutualité Sociale Agricole"), | ||
( | ||
"OACAS", | ||
"OACAS - Structure porteuse d'un agrément national organisme d'accueil communautaire et" | ||
" d'activité solidaire", | ||
), | ||
("OIL", "Opérateur d'intermédiation locative"), | ||
("ODC", "Organisation délégataire d'un Conseil Départemental (Orientation et suivi des BRSA)"), | ||
("OHPD", "Organisme habilité par le préfet de département"), | ||
( | ||
"OCASF", | ||
"Organisme mentionné au 8° du I de l’article L. 312-1 du code de l’action sociale et des" | ||
" familles", | ||
), | ||
("PENSION", "Pension de famille / résidence accueil"), | ||
("PIJ_BIJ", "PIJ-BIJ - Point/Bureau information jeunesse"), | ||
("PJJ", "PJJ - Protection judiciaire de la jeunesse"), | ||
("PLIE", "PLIE - Plan local pour l'insertion et l'emploi"), | ||
("RS_FJT", "Résidence sociale / FJT - Foyer de Jeunes Travailleurs"), | ||
("PREVENTION", "Service ou club de prévention"), | ||
("DEPT", "Service social du conseil départemental"), | ||
("SPIP", "SPIP - Service pénitentiaire d'insertion et de probation"), | ||
("Autre", "Autre"), | ||
], | ||
verbose_name="typologie prescripteur à l'origine du PASS\xa0IAE", | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="cancelledapproval", | ||
name="origin_prescriber_organization_kind", | ||
field=models.CharField( | ||
choices=[ | ||
("AFPA", "AFPA - Agence nationale pour la formation professionnelle des adultes"), | ||
("ASE", "ASE - Aide sociale à l'enfance"), | ||
("Orienteur", "Autre organisation (orienteur)"), | ||
( | ||
"CAARUD", | ||
"CAARUD - Centre d'accueil et d'accompagnement à la réduction de risques pour usagers de" | ||
" drogues", | ||
), | ||
("CADA", "CADA - Centre d'accueil de demandeurs d'asile"), | ||
("CAF", "CAF - Caisse d'allocations familiales"), | ||
("CAP_EMPLOI", "Cap emploi"), | ||
("CAVA", "CAVA - Centre d'adaptation à la vie active"), | ||
("CCAS", "CCAS - Centre communal d'action sociale ou centre intercommunal d'action sociale"), | ||
("CHRS", "CHRS - Centre d'hébergement et de réinsertion sociale"), | ||
("CHU", "CHU - Centre d'hébergement d'urgence"), | ||
("CIDFF", "CIDFF - Centre d'information sur les droits des femmes et des familles"), | ||
("CPH", "CPH - Centre provisoire d'hébergement"), | ||
("CSAPA", "CSAPA - Centre de soins, d'accompagnement et de prévention en addictologie"), | ||
("E2C", "E2C - École de la deuxième chance"), | ||
("EPIDE", "EPIDE - Établissement pour l'insertion dans l'emploi"), | ||
("FT", "France Travail"), | ||
("HUDA", "HUDA - Hébergement d'urgence pour demandeurs d'asile"), | ||
("ML", "Mission locale"), | ||
("MSA", "MSA - Mutualité Sociale Agricole"), | ||
( | ||
"OACAS", | ||
"OACAS - Structure porteuse d'un agrément national organisme d'accueil communautaire et" | ||
" d'activité solidaire", | ||
), | ||
("OIL", "Opérateur d'intermédiation locative"), | ||
("ODC", "Organisation délégataire d'un Conseil Départemental (Orientation et suivi des BRSA)"), | ||
("OHPD", "Organisme habilité par le préfet de département"), | ||
( | ||
"OCASF", | ||
"Organisme mentionné au 8° du I de l’article L. 312-1 du code de l’action sociale et des" | ||
" familles", | ||
), | ||
("PENSION", "Pension de famille / résidence accueil"), | ||
("PIJ_BIJ", "PIJ-BIJ - Point/Bureau information jeunesse"), | ||
("PJJ", "PJJ - Protection judiciaire de la jeunesse"), | ||
("PLIE", "PLIE - Plan local pour l'insertion et l'emploi"), | ||
("RS_FJT", "Résidence sociale / FJT - Foyer de Jeunes Travailleurs"), | ||
("PREVENTION", "Service ou club de prévention"), | ||
("DEPT", "Service social du conseil départemental"), | ||
("SPIP", "SPIP - Service pénitentiaire d'insertion et de probation"), | ||
("Autre", "Autre"), | ||
], | ||
verbose_name="typologie prescripteur", | ||
), | ||
), | ||
migrations.RunPython(update_approvals, reverse_code=migrations.RunPython.noop, elidable=True), | ||
migrations.RunPython(update_cancelled_approvals, reverse_code=migrations.RunPython.noop, elidable=True), | ||
] |
This file contains 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
Oops, something went wrong.