From e501ada83f499d847336cd5d8267f75e6f205d14 Mon Sep 17 00:00:00 2001 From: heinzel Date: Tue, 8 Dec 2020 18:00:23 +0100 Subject: [PATCH] Correct db migration for trashbin feature --- dav_registration/migrations/0006_auto_20201203_1144.py | 5 +++-- dav_registration/models.py | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/dav_registration/migrations/0006_auto_20201203_1144.py b/dav_registration/migrations/0006_auto_20201203_1144.py index 13d155a..f106d0c 100644 --- a/dav_registration/migrations/0006_auto_20201203_1144.py +++ b/dav_registration/migrations/0006_auto_20201203_1144.py @@ -27,9 +27,10 @@ class Migration(migrations.Migration): 'ordering': ['updated_at'], }, ), - migrations.RemoveField( + migrations.RenameField( model_name='registration', - name='answered', + old_name='answered', + new_name='answered_2migrate', ), migrations.AddField( model_name='registrationstatus', diff --git a/dav_registration/models.py b/dav_registration/models.py index 38b614c..be1593c 100644 --- a/dav_registration/models.py +++ b/dav_registration/models.py @@ -72,6 +72,8 @@ class Registration(models.Model): verbose_name=_('Einwilligung zur Datenspeicherung')) purge_at = models.DateTimeField(_('Zeitpunkt der Datenlöschung')) + answered_2migrate = models.BooleanField(default=False, verbose_name=_('Durch Tourleitung beantwortet')) + @staticmethod def pk2hexstr(pk): return hex(pk * 113)[2:] # 113 has no meaning, but it produce nice looking hex codes.