diff --git a/polyclinic_scheduling/apps/schedule/migrations/0005_auto_20200519_0821.py b/polyclinic_scheduling/apps/schedule/migrations/0005_auto_20200519_0821.py new file mode 100644 index 0000000..17a1066 --- /dev/null +++ b/polyclinic_scheduling/apps/schedule/migrations/0005_auto_20200519_0821.py @@ -0,0 +1,30 @@ +# Generated by Django 3.0.6 on 2020-05-19 08:21 + +import collections +from django.db import migrations, models +import jsonfield.fields + + +class Migration(migrations.Migration): + + dependencies = [ + ('schedule', '0004_auto_20200518_1425'), + ] + + operations = [ + migrations.AlterField( + model_name='schedule', + name='output_peregrine', + field=models.BinaryField(blank=True, help_text='This is the output in binary format from the Peregrine cluster', null=True, verbose_name='Peregrine binary output'), + ), + migrations.AlterField( + model_name='schedule', + name='peregrine_result', + field=jsonfield.fields.JSONField(blank=True, help_text='The results from the Peregrine job in JSON', load_kwargs={'object_pairs_hook': collections.OrderedDict}, null=True, verbose_name='Peregrine JSON output'), + ), + migrations.AlterField( + model_name='schedule', + name='planning_source', + field=jsonfield.fields.JSONField(blank=True, help_text='The schedule input in JSON format based on the form data', load_kwargs={'object_pairs_hook': collections.OrderedDict}, null=True, verbose_name='Schedule input'), + ), + ] diff --git a/polyclinic_scheduling/apps/schedule/models.py b/polyclinic_scheduling/apps/schedule/models.py index 4361435..9f9dd5e 100644 --- a/polyclinic_scheduling/apps/schedule/models.py +++ b/polyclinic_scheduling/apps/schedule/models.py @@ -76,11 +76,11 @@ class Schedule(MetaDataModel): status = models.CharField(_('Status'), max_length=10, choices=ScheduleStatus.choices, default=ScheduleStatus.NEW, help_text=_('The status of this schedule.'), db_index=True, ) - planning_source = JSONField(_('Schedule input'), blank=True, load_kwargs={'object_pairs_hook': collections.OrderedDict}, help_text=_('The schedule input in JSON format based on the form data')) + planning_source = JSONField(_('Schedule input'), blank=True, null=True, load_kwargs={'object_pairs_hook': collections.OrderedDict}, help_text=_('The schedule input in JSON format based on the form data')) - peregrine_result = JSONField(_('Peregrine JSON output'), blank=True, load_kwargs={'object_pairs_hook': collections.OrderedDict}, help_text=_('The results from the Peregrine job in JSON')) + peregrine_result = JSONField(_('Peregrine JSON output'), blank=True, null=True, load_kwargs={'object_pairs_hook': collections.OrderedDict}, help_text=_('The results from the Peregrine job in JSON')) - output_peregrine = models.BinaryField(_('Peregrine binary output'), blank=True, help_text=_('This is the output in binary format from the Peregrine cluster')) + output_peregrine = models.BinaryField(_('Peregrine binary output'), blank=True, null=True, help_text=_('This is the output in binary format from the Peregrine cluster')) report_sent = models.DateTimeField(_('Report is send to user'), blank=True, null=True, help_text=_('The date and time when the report has sended to the user.'))