diff --git a/geocity/apps/forms/migrations/0023_alter_form_category.py b/geocity/apps/forms/migrations/0023_alter_form_category_and_delete_contacttypeforadminsite.py similarity index 87% rename from geocity/apps/forms/migrations/0023_alter_form_category.py rename to geocity/apps/forms/migrations/0023_alter_form_category_and_delete_contacttypeforadminsite.py index 284ea7323..29e64bd2a 100644 --- a/geocity/apps/forms/migrations/0023_alter_form_category.py +++ b/geocity/apps/forms/migrations/0023_alter_form_category_and_delete_contacttypeforadminsite.py @@ -21,4 +21,7 @@ class Migration(migrations.Migration): verbose_name="catégorie", ), ), + migrations.DeleteModel( + name="ContactTypeForAdminSite", + ), ] diff --git a/geocity/apps/forms/migrations/0025_contactformforadminsite.py b/geocity/apps/forms/migrations/0024_contactformforadminsite.py similarity index 55% rename from geocity/apps/forms/migrations/0025_contactformforadminsite.py rename to geocity/apps/forms/migrations/0024_contactformforadminsite.py index d5b29193a..16579a744 100644 --- a/geocity/apps/forms/migrations/0025_contactformforadminsite.py +++ b/geocity/apps/forms/migrations/0024_contactformforadminsite.py @@ -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"), ] @@ -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",), + ), ] diff --git a/geocity/apps/forms/migrations/0024_delete_contacttypeforadminsite.py b/geocity/apps/forms/migrations/0024_delete_contacttypeforadminsite.py deleted file mode 100644 index dedde4618..000000000 --- a/geocity/apps/forms/migrations/0024_delete_contacttypeforadminsite.py +++ /dev/null @@ -1,16 +0,0 @@ -# Generated by Django 4.2.1 on 2023-08-03 06:12 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ("forms", "0023_alter_form_category"), - ] - - operations = [ - migrations.DeleteModel( - name="ContactTypeForAdminSite", - ), - ] diff --git a/geocity/apps/forms/migrations/0026_contacttypeforadminsite.py b/geocity/apps/forms/migrations/0026_contacttypeforadminsite.py deleted file mode 100644 index 04aa6c473..000000000 --- a/geocity/apps/forms/migrations/0026_contacttypeforadminsite.py +++ /dev/null @@ -1,26 +0,0 @@ -# Generated by Django 4.2.1 on 2023-08-07 11:55 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ("submissions", "0023_alter_contacttype_options_and_more"), - ("forms", "0025_contactformforadminsite"), - ] - - operations = [ - 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",), - ), - ] diff --git a/geocity/apps/submissions/migrations/0022_contactform_and_more.py b/geocity/apps/submissions/migrations/0022_contactform_and_more.py index f54ebb82a..e22300653 100644 --- a/geocity/apps/submissions/migrations/0022_contactform_and_more.py +++ b/geocity/apps/submissions/migrations/0022_contactform_and_more.py @@ -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"), ] @@ -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", @@ -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", + ), + ), ] diff --git a/geocity/apps/submissions/migrations/0023_alter_contacttype_options_and_more.py b/geocity/apps/submissions/migrations/0023_alter_contacttype_options_and_more.py deleted file mode 100644 index 260813157..000000000 --- a/geocity/apps/submissions/migrations/0023_alter_contacttype_options_and_more.py +++ /dev/null @@ -1,29 +0,0 @@ -# Generated by Django 4.2.1 on 2023-08-07 11:55 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ("submissions", "0022_contactform_and_more"), - ] - - operations = [ - 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_used_dynamically", - field=models.BooleanField( - default=True, - help_text="Permet à l'utilisateur d'ajouter ce type de contact de manière dynamique lors de la saisie.", - verbose_name="Peut-être ajouté dynamiquement", - ), - ), - ] diff --git a/geocity/apps/submissions/migrations/0024_remove_contactform_is_used_dynamically_and_more.py b/geocity/apps/submissions/migrations/0024_remove_contactform_is_used_dynamically_and_more.py deleted file mode 100644 index d0dcb0fdc..000000000 --- a/geocity/apps/submissions/migrations/0024_remove_contactform_is_used_dynamically_and_more.py +++ /dev/null @@ -1,26 +0,0 @@ -# Generated by Django 4.2.1 on 2023-08-07 12:05 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ("submissions", "0023_alter_contacttype_options_and_more"), - ] - - operations = [ - migrations.RemoveField( - model_name="contactform", - name="is_used_dynamically", - ), - 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", - ), - ), - ] diff --git a/geocity/apps/submissions/migrations/0025_alter_submission_creditor_type.py b/geocity/apps/submissions/migrations/0025_alter_submission_creditor_type.py deleted file mode 100644 index 2b83aea25..000000000 --- a/geocity/apps/submissions/migrations/0025_alter_submission_creditor_type.py +++ /dev/null @@ -1,25 +0,0 @@ -# Generated by Django 4.2.1 on 2023-08-17 06:31 - -import django.db.models.deletion -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ("submissions", "0024_remove_contactform_is_used_dynamically_and_more"), - ] - - operations = [ - migrations.AlterField( - model_name="submission", - name="creditor_type", - field=models.ForeignKey( - blank=True, - null=True, - on_delete=django.db.models.deletion.SET_NULL, - to="submissions.contacttype", - verbose_name="Destinataire de la facture", - ), - ), - ]