From 98f84145763b3334ce3bb5318d8247050c6f7c42 Mon Sep 17 00:00:00 2001 From: Roman Date: Mon, 29 Sep 2025 00:32:09 +0200 Subject: [PATCH] Add migrations for ProjectRequest and ProjectsDeclined models with updated options and field constraints --- .../0099_projectrequest_projectsdeclined.py | 64 +++++++++++++++++++ ...0_alter_projectrequest_options_and_more.py | 57 +++++++++++++++++ 2 files changed, 121 insertions(+) create mode 100644 input/migrations/0099_projectrequest_projectsdeclined.py create mode 100644 input/migrations/0100_alter_projectrequest_options_and_more.py diff --git a/input/migrations/0099_projectrequest_projectsdeclined.py b/input/migrations/0099_projectrequest_projectsdeclined.py new file mode 100644 index 0000000..016b043 --- /dev/null +++ b/input/migrations/0099_projectrequest_projectsdeclined.py @@ -0,0 +1,64 @@ +# Generated by Django 5.2.5 on 2025-09-24 16:58 + +import django.core.validators +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('input', '0098_add_eliterature_and_software_proxies'), + ] + + operations = [ + migrations.CreateModel( + name='ProjectRequest', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('realname', models.CharField(default='', help_text='Bitte gib deinen Vornamen und deinen Nachnamen ein.', max_length=200, null=True, verbose_name='Realname')), + ('email', models.EmailField(help_text='Bitte gib deine E-Mail-Adresse ein, damit dich
Wikimedia Deutschland bei Rückfragen oder für
die Zusage kontaktieren kann.', max_length=200, null=True, verbose_name='E-Mail-Adresse')), + ('granted', models.BooleanField(null=True, verbose_name='bewilligt')), + ('granted_date', models.DateField(null=True, verbose_name='bewilligt am')), + ('survey_mail_date', models.DateField(blank=True, null=True, verbose_name='Umfragemail wurde verschickt am')), + ('mail_state', models.CharField(choices=[('NONE', 'noch keine Mail versendet'), ('INF', 'die Benachrichtigung zur Projektabschlussmail wurde versendet'), ('CLOSE', 'die Projektabschlussmail wurde versendet'), ('END', 'alle automatischen Mails, auch surveyMail, wurden versendet')], default='NONE', max_length=6)), + ('survey_mail_send', models.BooleanField(default=False, verbose_name='Keine Umfragemail schicken')), + ('name', models.CharField(max_length=200, verbose_name='Name des Projekts')), + ('description', models.TextField(max_length=500, verbose_name='Kurzbeschreibung des Projekts')), + ('categories', models.JSONField(default=list, verbose_name='Projektkategorie')), + ('categories_other', models.CharField(blank=True, max_length=200, null=True, verbose_name='Projektkategorie: Sonstiges (kurz)')), + ('wikimedia_projects', models.JSONField(default=list, verbose_name='Wikimedia Projekt(e)')), + ('wikimedia_other', models.CharField(blank=True, max_length=200, null=True, verbose_name='Wikimedia-Projekt: Anderes (kurz)')), + ('start', models.DateField(verbose_name='Startdatum')), + ('end', models.DateField(verbose_name='Erwartetes Projektende')), + ('participants_estimated', models.IntegerField(validators=[django.core.validators.MinValueValidator(0)], verbose_name='Teilnehmende angefragt')), + ('page', models.URLField(blank=True, max_length=2000, null=True, verbose_name='Link zur Projektseite')), + ('group', models.CharField(blank=True, max_length=2000, null=True, verbose_name='Mitorganisierende')), + ('location', models.CharField(blank=True, max_length=2000, null=True, verbose_name='Ort/Adresse/Location')), + ('cost', models.IntegerField(validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(1000)], verbose_name='Kosten (EUR, ganzzahlig)')), + ('insurance', models.BooleanField(default=False, verbose_name='Haftpflichtversicherung gewünscht?')), + ('notes', models.TextField(blank=True, max_length=2000, null=True, verbose_name='Anmerkungen')), + ('decision', models.CharField(choices=[('OPEN', 'offen'), ('APPROVED', 'bewilligt'), ('DECLINED', 'abgelehnt')], default='OPEN', max_length=10)), + ('decision_date', models.DateField(blank=True, null=True)), + ('decided_by', models.CharField(blank=True, max_length=100, null=True, verbose_name='Entschieden von')), + ], + options={ + 'verbose_name': 'Projektförderungs-Antrag (< 1000 EUR)', + 'verbose_name_plural': 'Projects_requested', + }, + ), + migrations.CreateModel( + name='ProjectsDeclined', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('original_request_id', models.IntegerField()), + ('name', models.CharField(max_length=200)), + ('realname', models.CharField(max_length=200)), + ('email', models.EmailField(max_length=254)), + ('decision_date', models.DateField()), + ('reason', models.TextField(blank=True, null=True)), + ], + options={ + 'verbose_name_plural': 'Projects_declined', + }, + ), + ] diff --git a/input/migrations/0100_alter_projectrequest_options_and_more.py b/input/migrations/0100_alter_projectrequest_options_and_more.py new file mode 100644 index 0000000..cc07c49 --- /dev/null +++ b/input/migrations/0100_alter_projectrequest_options_and_more.py @@ -0,0 +1,57 @@ +# Generated by Django 5.2.5 on 2025-09-28 22:27 + +import django.core.validators +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('input', '0099_projectrequest_projectsdeclined'), + ] + + operations = [ + migrations.AlterModelOptions( + name='projectrequest', + options={'ordering': ('-id',), 'verbose_name': 'Projektförderungs-Antrag (< 1000 EUR)', 'verbose_name_plural': 'Projects_requested'}, + ), + migrations.AlterModelOptions( + name='projectsdeclined', + options={'ordering': ('-decision_date', '-id'), 'verbose_name_plural': 'Projects_declined'}, + ), + migrations.AlterField( + model_name='projectrequest', + name='cost', + field=models.IntegerField(validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(1000)], verbose_name='Höhe der Projektkosten'), + ), + migrations.AlterField( + model_name='projectrequest', + name='decision', + field=models.CharField(choices=[('OPEN', 'offen'), ('APPROVED', 'bewilligt'), ('DECLINED', 'abgelehnt')], db_index=True, default='OPEN', max_length=10), + ), + migrations.AlterField( + model_name='projectrequest', + name='decision_date', + field=models.DateField(blank=True, db_index=True, null=True), + ), + migrations.AlterField( + model_name='projectrequest', + name='insurance', + field=models.BooleanField(default=False, verbose_name='Versicherung gewünscht?'), + ), + migrations.AlterField( + model_name='projectrequest', + name='location', + field=models.CharField(blank=True, max_length=2000, null=True, verbose_name='Ort'), + ), + migrations.AlterField( + model_name='projectrequest', + name='participants_estimated', + field=models.IntegerField(validators=[django.core.validators.MinValueValidator(0)], verbose_name='Zahl der Teilnehmenden'), + ), + migrations.AlterField( + model_name='projectsdeclined', + name='original_request_id', + field=models.PositiveIntegerField(), + ), + ]