-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add script to fix communes from 2021
Add the field type_commune to fradm.Commune
- Loading branch information
Showing
11 changed files
with
95 additions
and
39,117 deletions.
There are no files selected for viewing
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
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
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
32 changes: 32 additions & 0 deletions
32
mesads/fradm/migrations/0003_alter_commune_unique_together_commune_type_commune.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,32 @@ | ||
# Generated by Django 5.0.6 on 2024-07-05 09:41 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("fradm", "0002_create_extension_unaccent"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterUniqueTogether( | ||
name="commune", | ||
unique_together=set(), | ||
), | ||
migrations.AddField( | ||
model_name="commune", | ||
name="type_commune", | ||
field=models.CharField( | ||
choices=[ | ||
("COM", "Commune"), | ||
("COMA", "Commune associée"), | ||
("COMD", "Commune déléguée"), | ||
("ARM", "Arrondissement municipal"), | ||
], | ||
default="COM", | ||
max_length=16, | ||
verbose_name="Type de commune", | ||
), | ||
preserve_default=False, | ||
), | ||
] |
21 changes: 21 additions & 0 deletions
21
mesads/fradm/migrations/0004_alter_commune_insee_alter_commune_unique_together.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,21 @@ | ||
# Generated by Django 5.0.6 on 2024-07-05 09:45 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("fradm", "0003_alter_commune_unique_together_commune_type_commune"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="commune", | ||
name="insee", | ||
field=models.CharField(max_length=16), | ||
), | ||
migrations.AlterUniqueTogether( | ||
name="commune", | ||
unique_together={("type_commune", "insee")}, | ||
), | ||
] |
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
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
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 @@ | ||
Downloaded from https://www.insee.fr/fr/information/5057840 |
Oops, something went wrong.