From eae5404de819e574076ba4babb28e968da45f73d Mon Sep 17 00:00:00 2001 From: Jorrit Schaap <schaap@astron.nl> Date: Wed, 18 Sep 2024 16:46:02 +0200 Subject: [PATCH] TMSS-2027: adaptations to get the migrations working again with this new major django version --- .../tmss/tmssapp/migrations/0001_initial.py | 54 +++++++++---------- .../migrations/0005_remove_obsolete_fields.py | 6 +-- .../tmssapp/migrations/0007_systemevent.py | 4 +- .../0013_add_processing_feedback_doc.py | 4 +- .../tmssapp/migrations/0049_cyclereport.py | 2 +- .../backend/src/tmss/tmssapp/models/common.py | 4 +- .../src/tmss/tmssapp/models/permissions.py | 3 +- .../src/tmss/tmssapp/models/scheduling.py | 4 +- .../tmss/tmssapp/viewsets/lofar_viewset.py | 3 +- 9 files changed, 42 insertions(+), 42 deletions(-) diff --git a/SAS/TMSS/backend/src/tmss/tmssapp/migrations/0001_initial.py b/SAS/TMSS/backend/src/tmss/tmssapp/migrations/0001_initial.py index 5d19ced6b76..1b9d0f448d4 100644 --- a/SAS/TMSS/backend/src/tmss/tmssapp/migrations/0001_initial.py +++ b/SAS/TMSS/backend/src/tmss/tmssapp/migrations/0001_initial.py @@ -35,7 +35,7 @@ class Migration(migrations.Migration): ('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')), ('is_active', models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')), ('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')), - ('project_roles', django.contrib.postgres.fields.jsonb.JSONField(blank=True, help_text='A list of structures that contain a project name and project role', null=True)), + ('project_roles', models.JSONField(blank=True, help_text='A list of structures that contain a project name and project role', null=True)), ], options={ 'verbose_name': 'user', @@ -88,7 +88,7 @@ class Migration(migrations.Migration): ('name', models.CharField(help_text='Human-readable name of this object.', max_length=128)), ('description', models.CharField(blank=True, default='', help_text='A longer description of this object.', max_length=255)), ('version', models.IntegerField(editable=False, help_text='Version of this template (with respect to other templates of the same name)')), - ('schema', django.contrib.postgres.fields.jsonb.JSONField(help_text='Schema for the configurable parameters needed to use this template.')), + ('schema', models.JSONField(help_text='Schema for the configurable parameters needed to use this template.')), ], options={ 'abstract': False, @@ -136,10 +136,10 @@ class Migration(migrations.Migration): ('filename', models.CharField(help_text='Name of the file (or top-level directory) of the dataproduct. Adheres to a naming convention, but is not meant for parsing.', max_length=128)), ('directory', models.CharField(help_text='Directory where this dataproduct is (to be) stored.', max_length=1024)), ('deleted_since', models.DateTimeField(help_text='When this dataproduct was removed from disk, or NULL if not deleted (NULLable).', null=True)), - ('specifications_doc', django.contrib.postgres.fields.jsonb.JSONField(help_text='Dataproduct properties (f.e. beam, subband), to distinguish them when produced by the same task, and to act as input for selections in the Task Input and Work Request Relation Blueprint objects.')), + ('specifications_doc', models.JSONField(help_text='Dataproduct properties (f.e. beam, subband), to distinguish them when produced by the same task, and to act as input for selections in the Task Input and Work Request Relation Blueprint objects.')), ('expected_size', models.BigIntegerField(help_text='Expected size of dataproduct size, in bytes. Used for scheduling purposes. NULL if size is unknown (NULLable).', null=True)), ('size', models.BigIntegerField(help_text='Dataproduct size, in bytes. Used for accounting purposes. NULL if size is (yet) unknown (NULLable).', null=True)), - ('feedback_doc', django.contrib.postgres.fields.jsonb.JSONField(help_text='Dataproduct properties, as reported by the producing process.')), + ('feedback_doc', models.JSONField(help_text='Dataproduct properties, as reported by the producing process.')), ], options={ 'abstract': False, @@ -171,7 +171,7 @@ class Migration(migrations.Migration): ('name', models.CharField(help_text='Human-readable name of this object.', max_length=128)), ('description', models.CharField(blank=True, default='', help_text='A longer description of this object.', max_length=255)), ('version', models.IntegerField(editable=False, help_text='Version of this template (with respect to other templates of the same name)')), - ('schema', django.contrib.postgres.fields.jsonb.JSONField(help_text='Schema for the configurable parameters needed to use this template.')), + ('schema', models.JSONField(help_text='Schema for the configurable parameters needed to use this template.')), ], options={ 'abstract': False, @@ -200,7 +200,7 @@ class Migration(migrations.Migration): ('name', models.CharField(help_text='Human-readable name of this object.', max_length=128)), ('description', models.CharField(blank=True, default='', help_text='A longer description of this object.', max_length=255)), ('version', models.IntegerField(editable=False, help_text='Version of this template (with respect to other templates of the same name)')), - ('schema', django.contrib.postgres.fields.jsonb.JSONField(help_text='Schema for the configurable parameters needed to use this template.')), + ('schema', models.JSONField(help_text='Schema for the configurable parameters needed to use this template.')), ], options={ 'abstract': False, @@ -378,7 +378,7 @@ class Migration(migrations.Migration): ('description', models.CharField(help_text='Short description for this reservation, used in overviews', max_length=255)), ('start_time', models.DateTimeField(help_text='Start of this reservation.')), ('stop_time', models.DateTimeField(help_text='Stop of this reservation. If null, then this reservation is indefinitely.', null=True)), - ('specifications_doc', django.contrib.postgres.fields.jsonb.JSONField(help_text='Properties of this reservation')), + ('specifications_doc', models.JSONField(help_text='Properties of this reservation')), ], options={ 'abstract': False, @@ -395,7 +395,7 @@ class Migration(migrations.Migration): ('name', models.CharField(help_text='Human-readable name of this object.', max_length=128)), ('description', models.CharField(blank=True, default='', help_text='A longer description of this object.', max_length=255)), ('version', models.CharField(help_text='Version of this template (with respect to other templates of the same name).', max_length=128)), - ('template', django.contrib.postgres.fields.jsonb.JSONField(help_text='JSON-data compliant with the JSON-schema in the reservation_template. This reservation strategy template like a predefined recipe with all the correct settings, and defines which parameters the user can alter.')), + ('template', models.JSONField(help_text='JSON-data compliant with the JSON-schema in the reservation_template. This reservation strategy template like a predefined recipe with all the correct settings, and defines which parameters the user can alter.')), ], options={ 'abstract': False, @@ -411,7 +411,7 @@ class Migration(migrations.Migration): ('name', models.CharField(help_text='Human-readable name of this object.', max_length=128)), ('description', models.CharField(blank=True, default='', help_text='A longer description of this object.', max_length=255)), ('version', models.IntegerField(editable=False, help_text='Version of this template (with respect to other templates of the same name)')), - ('schema', django.contrib.postgres.fields.jsonb.JSONField(help_text='Schema for the configurable parameters needed to use this template.')), + ('schema', models.JSONField(help_text='Schema for the configurable parameters needed to use this template.')), ], options={ 'abstract': False, @@ -446,7 +446,7 @@ class Migration(migrations.Migration): ('tags', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128), blank=True, default=list, help_text='User-defined search keywords for object.', size=8)), ('created_at', models.DateTimeField(auto_now_add=True, help_text='Moment of object creation.')), ('updated_at', models.DateTimeField(auto_now=True, help_text='Moment of last object update.')), - ('specifications_doc', django.contrib.postgres.fields.jsonb.JSONField(help_text='SAP properties.')), + ('specifications_doc', models.JSONField(help_text='SAP properties.')), ], options={ 'abstract': False, @@ -463,7 +463,7 @@ class Migration(migrations.Migration): ('name', models.CharField(help_text='Human-readable name of this object.', max_length=128)), ('description', models.CharField(blank=True, default='', help_text='A longer description of this object.', max_length=255)), ('version', models.IntegerField(editable=False, help_text='Version of this template (with respect to other templates of the same name)')), - ('schema', django.contrib.postgres.fields.jsonb.JSONField(help_text='Schema for the configurable parameters needed to use this template.')), + ('schema', models.JSONField(help_text='Schema for the configurable parameters needed to use this template.')), ], options={ 'abstract': False, @@ -479,7 +479,7 @@ class Migration(migrations.Migration): ('name', models.CharField(help_text='Human-readable name of this object.', max_length=128)), ('description', models.CharField(blank=True, default='', help_text='A longer description of this object.', max_length=255)), ('version', models.IntegerField(editable=False, help_text='Version of this template (with respect to other templates of the same name)')), - ('schema', django.contrib.postgres.fields.jsonb.JSONField(help_text='Schema for the configurable parameters needed to use this template.')), + ('schema', models.JSONField(help_text='Schema for the configurable parameters needed to use this template.')), ], options={ 'abstract': False, @@ -518,7 +518,7 @@ class Migration(migrations.Migration): ('name', models.CharField(help_text='Human-readable name of this object.', max_length=128)), ('description', models.CharField(blank=True, default='', help_text='A longer description of this object.', max_length=255)), ('version', models.IntegerField(editable=False, help_text='Version of this template (with respect to other templates of the same name)')), - ('template', django.contrib.postgres.fields.jsonb.JSONField(help_text='JSON-data compliant with the JSON-schema in the scheduling_set_template. This scheduling_set strategy template like a predefined recipe with all the correct settings, and defines which parameters the user can alter.')), + ('template', models.JSONField(help_text='JSON-data compliant with the JSON-schema in the scheduling_set_template. This scheduling_set strategy template like a predefined recipe with all the correct settings, and defines which parameters the user can alter.')), ], options={ 'abstract': False, @@ -534,7 +534,7 @@ class Migration(migrations.Migration): ('name', models.CharField(help_text='Human-readable name of this object.', max_length=128)), ('description', models.CharField(blank=True, default='', help_text='A longer description of this object.', max_length=255)), ('version', models.IntegerField(editable=False, help_text='Version of this template (with respect to other templates of the same name)')), - ('schema', django.contrib.postgres.fields.jsonb.JSONField(help_text='Schema for the configurable parameters needed to use this template.')), + ('schema', models.JSONField(help_text='Schema for the configurable parameters needed to use this template.')), ], options={ 'abstract': False, @@ -555,7 +555,7 @@ class Migration(migrations.Migration): ('piggyback_allowed_tbb', models.BooleanField(help_text='Piggyback key for TBB.', null=True)), ('piggyback_allowed_aartfaac', models.BooleanField(help_text='Piggyback key for AARTFAAC.', null=True)), ('priority_rank', models.FloatField(default=0.0, help_text='Priority of this scheduling unit w.r.t. other scheduling units within the same queue and project.')), - ('scheduling_constraints_doc', django.contrib.postgres.fields.jsonb.JSONField(help_text='Scheduling Constraints for this run.', null=True)), + ('scheduling_constraints_doc', models.JSONField(help_text='Scheduling Constraints for this run.', null=True)), ('interrupts_telescope', models.BooleanField(default=False, help_text='boolean (default FALSE), which indicates whether this observation was triggered (responsive telescope)')), ], options={ @@ -572,7 +572,7 @@ class Migration(migrations.Migration): ('updated_at', models.DateTimeField(auto_now=True, help_text='Moment of last object update.')), ('name', models.CharField(help_text='Human-readable name of this object.', max_length=128)), ('description', models.CharField(blank=True, default='', help_text='A longer description of this object.', max_length=255)), - ('scheduling_constraints_doc', django.contrib.postgres.fields.jsonb.JSONField(help_text='Scheduling Constraints for this run.', null=True)), + ('scheduling_constraints_doc', models.JSONField(help_text='Scheduling Constraints for this run.', null=True)), ('ingest_permission_required', models.BooleanField(default=False, help_text='Explicit permission is needed before the task.')), ('piggyback_allowed_tbb', models.BooleanField(help_text='Piggyback key for TBB.', null=True)), ('piggyback_allowed_aartfaac', models.BooleanField(help_text='Piggyback key for AARTFAAC.', null=True)), @@ -594,7 +594,7 @@ class Migration(migrations.Migration): ('name', models.CharField(help_text='Human-readable name of this object.', max_length=128)), ('description', models.CharField(blank=True, default='', help_text='A longer description of this object.', max_length=255)), ('version', models.IntegerField(editable=False, help_text='Version of this template (with respect to other templates of the same name)')), - ('template', django.contrib.postgres.fields.jsonb.JSONField(help_text='JSON-data compliant with the JSON-schema in the scheduling_unit_template. This observation strategy template like a predefined recipe with all the correct settings, and defines which parameters the user can alter.')), + ('template', models.JSONField(help_text='JSON-data compliant with the JSON-schema in the scheduling_unit_template. This observation strategy template like a predefined recipe with all the correct settings, and defines which parameters the user can alter.')), ], options={ 'abstract': False, @@ -610,7 +610,7 @@ class Migration(migrations.Migration): ('name', models.CharField(help_text='Human-readable name of this object.', max_length=128)), ('description', models.CharField(blank=True, default='', help_text='A longer description of this object.', max_length=255)), ('version', models.IntegerField(editable=False, help_text='Version of this template (with respect to other templates of the same name)')), - ('schema', django.contrib.postgres.fields.jsonb.JSONField(help_text='Schema for the configurable parameters needed to use this template.')), + ('schema', models.JSONField(help_text='Schema for the configurable parameters needed to use this template.')), ], options={ 'abstract': False, @@ -660,7 +660,7 @@ class Migration(migrations.Migration): ('actual_on_sky_start_time', models.DateTimeField(help_text='The time the observation actually started recording (NULLable).', null=True)), ('actual_on_sky_stop_time', models.DateTimeField(help_text='The time the observation actually stopped recording (NULLable).', null=True)), ('primary', models.BooleanField(db_index=True, default=False, help_text='TRUE if this is the one-and-only primary subtask in a parent TaskBlueprint.')), - ('specifications_doc', django.contrib.postgres.fields.jsonb.JSONField(help_text='Final specifications, as input for the controller.')), + ('specifications_doc', models.JSONField(help_text='Final specifications, as input for the controller.')), ('raw_feedback', models.CharField(help_text='The raw feedback for this Subtask', max_length=1048576, null=True)), ], options={ @@ -681,7 +681,7 @@ class Migration(migrations.Migration): ('tags', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128), blank=True, default=list, help_text='User-defined search keywords for object.', size=8)), ('created_at', models.DateTimeField(auto_now_add=True, help_text='Moment of object creation.')), ('updated_at', models.DateTimeField(auto_now=True, help_text='Moment of last object update.')), - ('selection_doc', django.contrib.postgres.fields.jsonb.JSONField(help_text='Filter to apply to the dataproducts of the producer, to derive input dataproducts when scheduling.')), + ('selection_doc', models.JSONField(help_text='Filter to apply to the dataproducts of the producer, to derive input dataproducts when scheduling.')), ], options={ 'abstract': False, @@ -732,7 +732,7 @@ class Migration(migrations.Migration): ('name', models.CharField(help_text='Human-readable name of this object.', max_length=128)), ('description', models.CharField(blank=True, default='', help_text='A longer description of this object.', max_length=255)), ('version', models.IntegerField(editable=False, help_text='Version of this template (with respect to other templates of the same name)')), - ('schema', django.contrib.postgres.fields.jsonb.JSONField(help_text='Schema for the configurable parameters needed to use this template.')), + ('schema', models.JSONField(help_text='Schema for the configurable parameters needed to use this template.')), ('queue', models.BooleanField(default=False)), ('realtime', models.BooleanField(default=False)), ], @@ -775,7 +775,7 @@ class Migration(migrations.Migration): ('updated_at', models.DateTimeField(auto_now=True, help_text='Moment of last object update.')), ('name', models.CharField(help_text='Human-readable name of this object.', max_length=128)), ('description', models.CharField(blank=True, default='', help_text='A longer description of this object.', max_length=255)), - ('specifications_doc', django.contrib.postgres.fields.jsonb.JSONField(help_text='Schedulings for this task (IMMUTABLE).')), + ('specifications_doc', models.JSONField(help_text='Schedulings for this task (IMMUTABLE).')), ('output_pinned', models.BooleanField(default=False, help_text='True if the output of this task is pinned to disk, that is, forbidden to be removed.')), ], options={ @@ -798,7 +798,7 @@ class Migration(migrations.Migration): ('updated_at', models.DateTimeField(auto_now=True, help_text='Moment of last object update.')), ('name', models.CharField(help_text='Human-readable name of this object.', max_length=128)), ('description', models.CharField(blank=True, default='', help_text='A longer description of this object.', max_length=255)), - ('specifications_doc', django.contrib.postgres.fields.jsonb.JSONField(help_text='Specifications for this task.')), + ('specifications_doc', models.JSONField(help_text='Specifications for this task.')), ('output_pinned', models.BooleanField(default=False, help_text='True if the output of this task is pinned to disk, that is, forbidden to be removed.')), ], options={ @@ -813,7 +813,7 @@ class Migration(migrations.Migration): ('tags', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128), blank=True, default=list, help_text='User-defined search keywords for object.', size=8)), ('created_at', models.DateTimeField(auto_now_add=True, help_text='Moment of object creation.')), ('updated_at', models.DateTimeField(auto_now=True, help_text='Moment of last object update.')), - ('selection_doc', django.contrib.postgres.fields.jsonb.JSONField(help_text='Filter for selecting dataproducts from the output role.')), + ('selection_doc', models.JSONField(help_text='Filter for selecting dataproducts from the output role.')), ], options={ 'abstract': False, @@ -827,7 +827,7 @@ class Migration(migrations.Migration): ('tags', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128), blank=True, default=list, help_text='User-defined search keywords for object.', size=8)), ('created_at', models.DateTimeField(auto_now_add=True, help_text='Moment of object creation.')), ('updated_at', models.DateTimeField(auto_now=True, help_text='Moment of last object update.')), - ('selection_doc', django.contrib.postgres.fields.jsonb.JSONField(help_text='Filter for selecting dataproducts from the output role.')), + ('selection_doc', models.JSONField(help_text='Filter for selecting dataproducts from the output role.')), ], options={ 'abstract': False, @@ -844,7 +844,7 @@ class Migration(migrations.Migration): ('name', models.CharField(help_text='Human-readable name of this object.', max_length=128)), ('description', models.CharField(blank=True, default='', help_text='A longer description of this object.', max_length=255)), ('version', models.IntegerField(editable=False, help_text='Version of this template (with respect to other templates of the same name)')), - ('schema', django.contrib.postgres.fields.jsonb.JSONField(help_text='Schema for the configurable parameters needed to use this template.')), + ('schema', models.JSONField(help_text='Schema for the configurable parameters needed to use this template.')), ], options={ 'abstract': False, @@ -882,7 +882,7 @@ class Migration(migrations.Migration): ('name', models.CharField(help_text='Human-readable name of this object.', max_length=128)), ('description', models.CharField(blank=True, default='', help_text='A longer description of this object.', max_length=255)), ('version', models.IntegerField(editable=False, help_text='Version of this template (with respect to other templates of the same name)')), - ('schema', django.contrib.postgres.fields.jsonb.JSONField(help_text='Schema for the configurable parameters needed to use this template.')), + ('schema', models.JSONField(help_text='Schema for the configurable parameters needed to use this template.')), ('validation_code_js', models.CharField(blank=True, default='', help_text='JavaScript code for additional (complex) validation.', max_length=128)), ('type', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='tmssapp.TaskType')), ], diff --git a/SAS/TMSS/backend/src/tmss/tmssapp/migrations/0005_remove_obsolete_fields.py b/SAS/TMSS/backend/src/tmss/tmssapp/migrations/0005_remove_obsolete_fields.py index 55fce632275..68e33583143 100644 --- a/SAS/TMSS/backend/src/tmss/tmssapp/migrations/0005_remove_obsolete_fields.py +++ b/SAS/TMSS/backend/src/tmss/tmssapp/migrations/0005_remove_obsolete_fields.py @@ -26,17 +26,17 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='schedulingsetstrategytemplate', name='template', - field=django.contrib.postgres.fields.jsonb.JSONField(help_text='JSON-data document compliant with the JSON-schema in the referenced template. This strategy template is like a predefined recipe with all the correct settings, and defines which parameters the user can alter.'), + field=models.JSONField(help_text='JSON-data document compliant with the JSON-schema in the referenced template. This strategy template is like a predefined recipe with all the correct settings, and defines which parameters the user can alter.'), ), migrations.AlterField( model_name='schedulingunitobservingstrategytemplate', name='template', - field=django.contrib.postgres.fields.jsonb.JSONField(help_text='JSON-data document compliant with the JSON-schema in the referenced template. This strategy template is like a predefined recipe with all the correct settings, and defines which parameters the user can alter.'), + field=models.JSONField(help_text='JSON-data document compliant with the JSON-schema in the referenced template. This strategy template is like a predefined recipe with all the correct settings, and defines which parameters the user can alter.'), ), migrations.AlterField( model_name='reservationstrategytemplate', name='template', - field=django.contrib.postgres.fields.jsonb.JSONField( + field=models.JSONField( help_text='JSON-data document compliant with the JSON-schema in the referenced template. This strategy template is like a predefined recipe with all the correct settings, and defines which parameters the user can alter.'), ), migrations.AlterField( diff --git a/SAS/TMSS/backend/src/tmss/tmssapp/migrations/0007_systemevent.py b/SAS/TMSS/backend/src/tmss/tmssapp/migrations/0007_systemevent.py index 0c9244dae2c..565a8685ffc 100644 --- a/SAS/TMSS/backend/src/tmss/tmssapp/migrations/0007_systemevent.py +++ b/SAS/TMSS/backend/src/tmss/tmssapp/migrations/0007_systemevent.py @@ -26,7 +26,7 @@ class Migration(migrations.Migration): ('start', models.DateTimeField(help_text='When this event started.')), ('stop', models.DateTimeField(help_text='When this event stopped (NULLable).', null=True)), ('notes', models.CharField(help_text='Any additional information', max_length=255, null=True)), - ('affected_hardware_doc', django.contrib.postgres.fields.jsonb.JSONField(help_text='Properties of this event, e.g. station list and other hardware affected')), + ('affected_hardware_doc', models.JSONField(help_text='Properties of this event, e.g. station list and other hardware affected')), ('jira_url', models.CharField(help_text='Link to JIRA issue (if any)', max_length=255, null=True)), ], options={ @@ -70,7 +70,7 @@ class Migration(migrations.Migration): ('name', models.CharField(help_text='Human-readable name of this object.', max_length=128)), ('description', models.CharField(blank=True, default='', help_text='A longer description of this object.', max_length=255)), ('version', models.IntegerField(editable=False, help_text='Version of this template (with respect to other templates of the same name)')), - ('schema', django.contrib.postgres.fields.jsonb.JSONField(help_text='Schema for the configurable parameters needed to use this template.')), + ('schema', models.JSONField(help_text='Schema for the configurable parameters needed to use this template.')), ], options={ 'abstract': False, diff --git a/SAS/TMSS/backend/src/tmss/tmssapp/migrations/0013_add_processing_feedback_doc.py b/SAS/TMSS/backend/src/tmss/tmssapp/migrations/0013_add_processing_feedback_doc.py index e15ef837419..da5ac65fe61 100644 --- a/SAS/TMSS/backend/src/tmss/tmssapp/migrations/0013_add_processing_feedback_doc.py +++ b/SAS/TMSS/backend/src/tmss/tmssapp/migrations/0013_add_processing_feedback_doc.py @@ -23,7 +23,7 @@ class Migration(migrations.Migration): ('name', models.CharField(help_text='Human-readable name of this object.', max_length=128)), ('description', models.CharField(blank=True, default='', help_text='A longer description of this object.', max_length=255)), ('version', models.IntegerField(editable=False, help_text='Version of this template (with respect to other templates of the same name)')), - ('schema', django.contrib.postgres.fields.jsonb.JSONField(help_text='Schema for the configurable parameters needed to use this template.')), + ('schema', models.JSONField(help_text='Schema for the configurable parameters needed to use this template.')), ], options={ 'abstract': False, @@ -40,7 +40,7 @@ class Migration(migrations.Migration): migrations.AddField( model_name='subtask', name='processing_feedback_doc', - field=django.contrib.postgres.fields.jsonb.JSONField(help_text='Processing properties, as reported by the process.', null=True), + field=models.JSONField(help_text='Processing properties, as reported by the process.', null=True), ), migrations.AddConstraint( model_name='subtaskfeedbacktemplate', diff --git a/SAS/TMSS/backend/src/tmss/tmssapp/migrations/0049_cyclereport.py b/SAS/TMSS/backend/src/tmss/tmssapp/migrations/0049_cyclereport.py index eac1f1a73aa..067056a6b17 100644 --- a/SAS/TMSS/backend/src/tmss/tmssapp/migrations/0049_cyclereport.py +++ b/SAS/TMSS/backend/src/tmss/tmssapp/migrations/0049_cyclereport.py @@ -17,7 +17,7 @@ class Migration(migrations.Migration): fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('cycle', models.OneToOneField(help_text='Cycle to which these quota apply.', on_delete=django.db.models.deletion.PROTECT, related_name='report', to='tmssapp.Cycle')), - ('data', django.contrib.postgres.fields.jsonb.JSONField(help_text='The report data')), + ('data', models.JSONField(help_text='The report data')), ('start', models.DateTimeField(help_text='Moment at which the reporting period starts.')), ('stop', models.DateTimeField(help_text='Moment at which the reporting period ends.')), ('tags', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=128), blank=True, default=list, help_text='User-defined search keywords for object.', size=8)), diff --git a/SAS/TMSS/backend/src/tmss/tmssapp/models/common.py b/SAS/TMSS/backend/src/tmss/tmssapp/models/common.py index bba2953d1a1..6f279bd364f 100644 --- a/SAS/TMSS/backend/src/tmss/tmssapp/models/common.py +++ b/SAS/TMSS/backend/src/tmss/tmssapp/models/common.py @@ -7,8 +7,8 @@ import typing logger = logging.getLogger(__name__) -from django.db.models import Model, CharField, DateTimeField, IntegerField, UniqueConstraint, ForeignKey, PROTECT, QuerySet -from django.contrib.postgres.fields import ArrayField, JSONField +from django.db.models import Model, CharField, DateTimeField, IntegerField, UniqueConstraint, ForeignKey, PROTECT, QuerySet, JSONField +from django.contrib.postgres.fields import ArrayField from django.contrib.postgres.indexes import GinIndex from django.db import transaction from django_prometheus.models import model_inserts, model_updates, model_deletes diff --git a/SAS/TMSS/backend/src/tmss/tmssapp/models/permissions.py b/SAS/TMSS/backend/src/tmss/tmssapp/models/permissions.py index 444707a8d07..a292acd725b 100644 --- a/SAS/TMSS/backend/src/tmss/tmssapp/models/permissions.py +++ b/SAS/TMSS/backend/src/tmss/tmssapp/models/permissions.py @@ -11,8 +11,7 @@ from enum import Enum from rest_framework.permissions import DjangoModelPermissions from django.contrib.auth.models import AbstractUser -from django.contrib.postgres.fields import JSONField -from django.db.models import BooleanField +from django.db.models import BooleanField, JSONField class TMSSUser(AbstractUser): """ diff --git a/SAS/TMSS/backend/src/tmss/tmssapp/models/scheduling.py b/SAS/TMSS/backend/src/tmss/tmssapp/models/scheduling.py index 3c0327cbc06..269ff5abb35 100644 --- a/SAS/TMSS/backend/src/tmss/tmssapp/models/scheduling.py +++ b/SAS/TMSS/backend/src/tmss/tmssapp/models/scheduling.py @@ -14,8 +14,8 @@ from datetime import datetime, timedelta import time from django.db.models import Model, ForeignKey, OneToOneField, CharField, DateTimeField, TimeField, DurationField, BooleanField, IntegerField, BigIntegerField, FloatField, \ - ManyToManyField, CASCADE, SET_NULL, PROTECT, QuerySet, BigAutoField, UniqueConstraint -from django.contrib.postgres.fields import ArrayField, JSONField + ManyToManyField, CASCADE, SET_NULL, PROTECT, QuerySet, BigAutoField, UniqueConstraint, JSONField +from django.contrib.postgres.fields import ArrayField from .permissions import TMSSUser as User from .common import AbstractChoice, BasicCommon, AbstractSchemaTemplate, NamedCommon, TemplateSchemaMixin, ProjectPropertyMixin, RefreshFromDbInvalidatesCachedPropertiesMixin from enum import Enum diff --git a/SAS/TMSS/backend/src/tmss/tmssapp/viewsets/lofar_viewset.py b/SAS/TMSS/backend/src/tmss/tmssapp/viewsets/lofar_viewset.py index c73895a1a34..c992089d526 100644 --- a/SAS/TMSS/backend/src/tmss/tmssapp/viewsets/lofar_viewset.py +++ b/SAS/TMSS/backend/src/tmss/tmssapp/viewsets/lofar_viewset.py @@ -30,7 +30,8 @@ from django_filters import filterset from django_filters import rest_framework from rest_framework.filters import OrderingFilter import django_property_filter as property_filters -from django.contrib.postgres.fields import JSONField, ArrayField +from django.contrib.postgres.fields import ArrayField +from django.db.models import JSONField from django.db.models.fields import CharField, TextField from copy import deepcopy -- GitLab