Skip to content
This repository has been archived by the owner on Jun 24, 2024. It is now read-only.

Commit

Permalink
squash migration
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexandreJunod committed Aug 17, 2023
1 parent 264c3bb commit 7b3e5a8
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 124 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,7 @@ class Migration(migrations.Migration):
verbose_name="catégorie",
),
),
migrations.DeleteModel(
name="ContactTypeForAdminSite",
),
]
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
class Migration(migrations.Migration):

dependencies = [
("forms", "0024_delete_contacttypeforadminsite"),
("forms", "0023_alter_form_category_and_delete_contacttypeforadminsite"),
("submissions", "0022_contactform_and_more"),
]

Expand All @@ -23,4 +23,16 @@ class Migration(migrations.Migration):
},
bases=("submissions.contactform",),
),
migrations.CreateModel(
name="ContactTypeForAdminSite",
fields=[],
options={
"verbose_name": "1.9 Type de contact",
"verbose_name_plural": "1.9 Types de contacts",
"proxy": True,
"indexes": [],
"constraints": [],
},
bases=("submissions.contacttype",),
),
]

This file was deleted.

26 changes: 0 additions & 26 deletions geocity/apps/forms/migrations/0026_contacttypeforadminsite.py

This file was deleted.

19 changes: 18 additions & 1 deletion geocity/apps/submissions/migrations/0022_contactform_and_more.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def migrate_contact_type_based_on_new_model(apps, schema_editor):
class Migration(migrations.Migration):

dependencies = [
("forms", "0024_delete_contacttypeforadminsite"),
("forms", "0023_alter_form_category_and_delete_contacttypeforadminsite"),
("auth", "0012_alter_user_first_name_max_length"),
("submissions", "0021_add_contact_type"),
]
Expand Down Expand Up @@ -207,6 +207,7 @@ class Migration(migrations.Migration):
model_name="submission",
name="creditor_type",
field=models.ForeignKey(
blank=True,
null=True,
on_delete=django.db.models.deletion.SET_NULL,
to="submissions.contacttype",
Expand All @@ -224,4 +225,20 @@ class Migration(migrations.Migration):
),
),
migrations.RunPython(migrate_contact_type_based_on_new_model),
migrations.AlterModelOptions(
name="contacttype",
options={
"verbose_name": "1.9 Type de contact",
"verbose_name_plural": "1.9 Types de contacts",
},
),
migrations.AddField(
model_name="contactform",
name="is_dynamic",
field=models.BooleanField(
default=False,
help_text="Permet à l'utilisateur d'ajouter ce type de contact lors de la saisie, autant de fois que souhaité.",
verbose_name="Dynamique",
),
),
]

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit 7b3e5a8

Please sign in to comment.