From 499f90e88cf7f6b47c0a5433542ad9b2506b53b8 Mon Sep 17 00:00:00 2001 From: Jean-Marie Favreau Date: Thu, 17 Oct 2024 10:27:45 +0200 Subject: [PATCH] Ajout migration BDD --- ...9_alter_recurrentimport_defaultcategory.py | 19 +++++++++++++++++++ src/agenda_culturel/models.py | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 src/agenda_culturel/migrations/0089_alter_recurrentimport_defaultcategory.py diff --git a/src/agenda_culturel/migrations/0089_alter_recurrentimport_defaultcategory.py b/src/agenda_culturel/migrations/0089_alter_recurrentimport_defaultcategory.py new file mode 100644 index 0000000..1785621 --- /dev/null +++ b/src/agenda_culturel/migrations/0089_alter_recurrentimport_defaultcategory.py @@ -0,0 +1,19 @@ +# Generated by Django 4.2.9 on 2024-10-17 08:27 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('agenda_culturel', '0088_alter_referencelocation_options_and_more'), + ] + + operations = [ + migrations.AlterField( + model_name='recurrentimport', + name='defaultCategory', + field=models.ForeignKey(blank=True, default=None, help_text='Category of each imported event', null=True, on_delete=django.db.models.deletion.SET_DEFAULT, to='agenda_culturel.category', verbose_name='Category'), + ), + ] diff --git a/src/agenda_culturel/models.py b/src/agenda_culturel/models.py index 9bdc162..b062deb 100644 --- a/src/agenda_culturel/models.py +++ b/src/agenda_culturel/models.py @@ -1368,7 +1368,7 @@ class RecurrentImport(models.Model): help_text=_("Category of each imported event"), default=None, null=True, - blanck=True, + blank=True, on_delete=models.SET_DEFAULT, ) defaultTags = ArrayField(