diff --git a/api/migrations/0022_alter_uploadtask_registration_type.py b/api/migrations/0022_alter_uploadtask_registration_type.py new file mode 100644 index 0000000..61078ef --- /dev/null +++ b/api/migrations/0022_alter_uploadtask_registration_type.py @@ -0,0 +1,26 @@ +# Generated by Django 5.0.1 on 2024-03-14 19:13 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("api", "0021_remove_userprofile_default_project_number_and_more"), + ] + + operations = [ + migrations.AlterField( + model_name="uploadtask", + name="registration_type", + field=models.CharField( + choices=[ + ("GMN_StartRegistration", "GMN_StartRegistration"), + ("GMN_MeasuringPoint", "GMN_MeasuringPoint"), + ("GMN_MeasuringPointEndDate", "GMN_MeasuringPointEndDate"), + ("GMN_TubeReference", "GMN_TubeReference"), + ("GMN_Closure", "GMN_Closure"), + ], + max_length=235, + ), + ), + ] diff --git a/gmn/migrations/0015_alter_gmn_delivery_accountable_party_and_more.py b/gmn/migrations/0015_alter_gmn_delivery_accountable_party_and_more.py new file mode 100644 index 0000000..9093762 --- /dev/null +++ b/gmn/migrations/0015_alter_gmn_delivery_accountable_party_and_more.py @@ -0,0 +1,82 @@ +# Generated by Django 5.0.1 on 2024-03-14 19:39 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("gmn", "0014_alter_gmn_data_owner_and_more"), + ] + + operations = [ + migrations.AlterField( + model_name="gmn", + name="delivery_accountable_party", + field=models.CharField(max_length=8, null=True), + ), + migrations.AlterField( + model_name="gmn", + name="delivery_context", + field=models.CharField(max_length=100, null=True), + ), + migrations.AlterField( + model_name="gmn", + name="groundwater_aspect", + field=models.CharField(max_length=100, null=True), + ), + migrations.AlterField( + model_name="gmn", + name="monitoring_purpose", + field=models.CharField(max_length=100, null=True), + ), + migrations.AlterField( + model_name="gmn", + name="name", + field=models.CharField(max_length=100, null=True), + ), + migrations.AlterField( + model_name="gmn", + name="object_registration_time", + field=models.DateTimeField(null=True), + ), + migrations.AlterField( + model_name="gmn", + name="quality_regime", + field=models.CharField(max_length=50, null=True), + ), + migrations.AlterField( + model_name="gmn", + name="registration_status", + field=models.CharField(max_length=50, null=True), + ), + migrations.AlterField( + model_name="gmn", + name="start_date_monitoring", + field=models.DateField(null=True), + ), + migrations.AlterField( + model_name="measuringpoint", + name="gmw_bro_id", + field=models.CharField(max_length=50, null=True), + ), + migrations.AlterField( + model_name="measuringpoint", + name="measuringpoint_code", + field=models.CharField(max_length=50, null=True), + ), + migrations.AlterField( + model_name="measuringpoint", + name="measuringpoint_start_date", + field=models.DateField(null=True), + ), + migrations.AlterField( + model_name="measuringpoint", + name="tube_number", + field=models.CharField(max_length=50, null=True), + ), + migrations.AlterField( + model_name="measuringpoint", + name="tube_start_date", + field=models.DateField(null=True), + ), + ] diff --git a/gmn/models.py b/gmn/models.py index 3f823ac..8a4f015 100644 --- a/gmn/models.py +++ b/gmn/models.py @@ -16,15 +16,15 @@ class GMN(models.Model): updated_at = models.DateTimeField(auto_now=True) data_owner = models.ForeignKey(Organisation, on_delete=models.CASCADE) bro_id = models.CharField(max_length=18) - delivery_accountable_party = models.CharField(max_length=8) - quality_regime = models.CharField(max_length=50) - name = models.CharField(max_length=100) - delivery_context = models.CharField(max_length=100) - monitoring_purpose = models.CharField(max_length=100) - groundwater_aspect = models.CharField(max_length=100) - start_date_monitoring = models.DateField() - object_registration_time = models.DateTimeField() - registration_status = models.CharField(max_length=50) + delivery_accountable_party = models.CharField(max_length=8, null=True) + quality_regime = models.CharField(max_length=50, null=True) + name = models.CharField(max_length=100, null=True) + delivery_context = models.CharField(max_length=100, null=True) + monitoring_purpose = models.CharField(max_length=100, null=True) + groundwater_aspect = models.CharField(max_length=100, null=True) + start_date_monitoring = models.DateField(null=True) + object_registration_time = models.DateTimeField(null=True) + registration_status = models.CharField(max_length=50, null=True) def __str__(self): return self.bro_id @@ -46,11 +46,11 @@ class Measuringpoint(models.Model): updated_at = models.DateTimeField(auto_now=True) data_owner = models.ForeignKey(Organisation, on_delete=models.CASCADE) gmn = models.ForeignKey(GMN, on_delete=models.CASCADE) - measuringpoint_code = models.CharField(max_length=50) - measuringpoint_start_date = models.DateField() - gmw_bro_id = models.CharField(max_length=50) - tube_number = models.CharField(max_length=50) - tube_start_date = models.DateField() + measuringpoint_code = models.CharField(max_length=50, null=True) + measuringpoint_start_date = models.DateField(null=True) + gmw_bro_id = models.CharField(max_length=50, null=True) + tube_number = models.CharField(max_length=50, null=True) + tube_start_date = models.DateField(null=True) def __str__(self): return self.measuringpoint_code diff --git a/gmw/migrations/0008_alter_monitoringtube_tube_top_diameter.py b/gmw/migrations/0008_alter_monitoringtube_tube_top_diameter.py new file mode 100644 index 0000000..c81c477 --- /dev/null +++ b/gmw/migrations/0008_alter_monitoringtube_tube_top_diameter.py @@ -0,0 +1,17 @@ +# Generated by Django 5.0.1 on 2024-03-14 19:13 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("gmw", "0007_alter_gmw_construction_standard_alter_gmw_data_owner_and_more"), + ] + + operations = [ + migrations.AlterField( + model_name="monitoringtube", + name="tube_top_diameter", + field=models.CharField(max_length=100, null=True), + ), + ] diff --git a/gmw/migrations/0009_alter_gmw_well_stability.py b/gmw/migrations/0009_alter_gmw_well_stability.py new file mode 100644 index 0000000..b275f1f --- /dev/null +++ b/gmw/migrations/0009_alter_gmw_well_stability.py @@ -0,0 +1,17 @@ +# Generated by Django 5.0.1 on 2024-03-14 19:22 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("gmw", "0008_alter_monitoringtube_tube_top_diameter"), + ] + + operations = [ + migrations.AlterField( + model_name="gmw", + name="well_stability", + field=models.CharField(max_length=100, null=True), + ), + ] diff --git a/gmw/migrations/0010_alter_gmw_construction_standard_and_more.py b/gmw/migrations/0010_alter_gmw_construction_standard_and_more.py new file mode 100644 index 0000000..4364ea6 --- /dev/null +++ b/gmw/migrations/0010_alter_gmw_construction_standard_and_more.py @@ -0,0 +1,207 @@ +# Generated by Django 5.0.1 on 2024-03-14 19:39 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("gmw", "0009_alter_gmw_well_stability"), + ] + + operations = [ + migrations.AlterField( + model_name="gmw", + name="construction_standard", + field=models.CharField(max_length=100, null=True), + ), + migrations.AlterField( + model_name="gmw", + name="delivered_location", + field=models.CharField(max_length=100, null=True), + ), + migrations.AlterField( + model_name="gmw", + name="delivery_accountable_party", + field=models.CharField(max_length=8, null=True), + ), + migrations.AlterField( + model_name="gmw", + name="delivery_context", + field=models.CharField(max_length=100, null=True), + ), + migrations.AlterField( + model_name="gmw", + name="ground_level_position", + field=models.CharField(max_length=100, null=True), + ), + migrations.AlterField( + model_name="gmw", + name="ground_level_positioning_method", + field=models.CharField(max_length=100, null=True), + ), + migrations.AlterField( + model_name="gmw", + name="ground_level_stable", + field=models.CharField(max_length=100, null=True), + ), + migrations.AlterField( + model_name="gmw", + name="initial_function", + field=models.CharField(max_length=100, null=True), + ), + migrations.AlterField( + model_name="gmw", + name="local_vertical_reference_point", + field=models.CharField(max_length=100, null=True), + ), + migrations.AlterField( + model_name="gmw", + name="nitg_code", + field=models.CharField(max_length=100, null=True), + ), + migrations.AlterField( + model_name="gmw", + name="object_registration_time", + field=models.DateTimeField(null=True), + ), + migrations.AlterField( + model_name="gmw", + name="offset", + field=models.CharField(max_length=100, null=True), + ), + migrations.AlterField( + model_name="gmw", + name="owner", + field=models.CharField(max_length=100, null=True), + ), + migrations.AlterField( + model_name="gmw", + name="quality_regime", + field=models.CharField(max_length=50, null=True), + ), + migrations.AlterField( + model_name="gmw", + name="registration_status", + field=models.CharField(max_length=50, null=True), + ), + migrations.AlterField( + model_name="gmw", + name="removed", + field=models.CharField(max_length=100, null=True), + ), + migrations.AlterField( + model_name="gmw", + name="standardized_location", + field=models.CharField(max_length=100, null=True), + ), + migrations.AlterField( + model_name="gmw", + name="vertical_datum", + field=models.CharField(max_length=100, null=True), + ), + migrations.AlterField( + model_name="gmw", + name="well_code", + field=models.CharField(max_length=100, null=True), + ), + migrations.AlterField( + model_name="gmw", + name="well_head_protector", + field=models.CharField(max_length=100, null=True), + ), + migrations.AlterField( + model_name="monitoringtube", + name="artesian_well_cap_present", + field=models.CharField(max_length=100, null=True), + ), + migrations.AlterField( + model_name="monitoringtube", + name="glue", + field=models.CharField(max_length=100, null=True), + ), + migrations.AlterField( + model_name="monitoringtube", + name="number_of_geo_ohm_cables", + field=models.CharField(max_length=100, null=True), + ), + migrations.AlterField( + model_name="monitoringtube", + name="plain_tube_part_length", + field=models.CharField(max_length=100, null=True), + ), + migrations.AlterField( + model_name="monitoringtube", + name="screen_bottom_position", + field=models.CharField(max_length=100, null=True), + ), + migrations.AlterField( + model_name="monitoringtube", + name="screen_length", + field=models.CharField(max_length=100, null=True), + ), + migrations.AlterField( + model_name="monitoringtube", + name="screen_top_position", + field=models.CharField(max_length=100, null=True), + ), + migrations.AlterField( + model_name="monitoringtube", + name="sediment_sump_present", + field=models.CharField(max_length=100, null=True), + ), + migrations.AlterField( + model_name="monitoringtube", + name="sock_material", + field=models.CharField(max_length=100, null=True), + ), + migrations.AlterField( + model_name="monitoringtube", + name="tube_in_use", + field=models.CharField(max_length=100, null=True), + ), + migrations.AlterField( + model_name="monitoringtube", + name="tube_material", + field=models.CharField(max_length=100, null=True), + ), + migrations.AlterField( + model_name="monitoringtube", + name="tube_number", + field=models.CharField(max_length=100, null=True), + ), + migrations.AlterField( + model_name="monitoringtube", + name="tube_packing_material", + field=models.CharField(max_length=100, null=True), + ), + migrations.AlterField( + model_name="monitoringtube", + name="tube_part_inserted", + field=models.CharField(max_length=100, null=True), + ), + migrations.AlterField( + model_name="monitoringtube", + name="tube_status", + field=models.CharField(max_length=100, null=True), + ), + migrations.AlterField( + model_name="monitoringtube", + name="tube_top_position", + field=models.CharField(max_length=100, null=True), + ), + migrations.AlterField( + model_name="monitoringtube", + name="tube_top_positioning_method", + field=models.CharField(max_length=100, null=True), + ), + migrations.AlterField( + model_name="monitoringtube", + name="tube_type", + field=models.CharField(max_length=100, null=True), + ), + migrations.AlterField( + model_name="monitoringtube", + name="variable_diameter", + field=models.CharField(max_length=100, null=True), + ), + ] diff --git a/gmw/models.py b/gmw/models.py index f13e6fc..2196c06 100644 --- a/gmw/models.py +++ b/gmw/models.py @@ -19,31 +19,27 @@ class GMW(models.Model): on_delete=models.CASCADE, ) bro_id = models.CharField(max_length=18) - delivery_accountable_party = models.CharField(max_length=8) - quality_regime = models.CharField(max_length=50) - delivery_context = models.CharField(max_length=100) - construction_standard = models.CharField(max_length=100) - initial_function = models.CharField(max_length=100) - removed = models.CharField(max_length=100) - ground_level_stable = models.CharField(max_length=100) - well_stability = models.CharField(max_length=100) - nitg_code = models.CharField(max_length=100) - well_code = models.CharField(max_length=100) - owner = models.CharField(max_length=100) - well_head_protector = models.CharField(max_length=100) - delivered_location = models.CharField(max_length=100) - local_vertical_reference_point = models.CharField( - max_length=100, - ) - offset = models.CharField(max_length=100) - vertical_datum = models.CharField(max_length=100) - ground_level_position = models.CharField(max_length=100) - ground_level_positioning_method = models.CharField( - max_length=100, - ) - standardized_location = models.CharField(max_length=100) - object_registration_time = models.DateTimeField() - registration_status = models.CharField(max_length=50) + delivery_accountable_party = models.CharField(max_length=8, null=True) + quality_regime = models.CharField(max_length=50, null=True) + delivery_context = models.CharField(max_length=100, null=True) + construction_standard = models.CharField(max_length=100, null=True) + initial_function = models.CharField(max_length=100, null=True) + removed = models.CharField(max_length=100, null=True) + ground_level_stable = models.CharField(max_length=100, null=True) + well_stability = models.CharField(max_length=100, null=True) + nitg_code = models.CharField(max_length=100, null=True) + well_code = models.CharField(max_length=100, null=True) + owner = models.CharField(max_length=100, null=True) + well_head_protector = models.CharField(max_length=100, null=True) + delivered_location = models.CharField(max_length=100, null=True) + local_vertical_reference_point = models.CharField(max_length=100, null=True) + offset = models.CharField(max_length=100, null=True) + vertical_datum = models.CharField(max_length=100, null=True) + ground_level_position = models.CharField(max_length=100, null=True) + ground_level_positioning_method = models.CharField(max_length=100, null=True) + standardized_location = models.CharField(max_length=100, null=True) + object_registration_time = models.DateTimeField(null=True) + registration_status = models.CharField(max_length=50, null=True) def __str__(self): return self.bro_id @@ -63,28 +59,26 @@ class MonitoringTube(models.Model): on_delete=models.CASCADE, ) gmw = models.ForeignKey(GMW, on_delete=models.CASCADE) - tube_number = models.CharField(max_length=100) - tube_type = models.CharField(max_length=100) - artesian_well_cap_present = models.CharField(max_length=100) - sediment_sump_present = models.CharField(max_length=100) - number_of_geo_ohm_cables = models.CharField(max_length=100) - tube_top_diameter = models.CharField(max_length=100) - variable_diameter = models.CharField(max_length=100) - tube_status = models.CharField(max_length=100) - tube_top_position = models.CharField(max_length=100) - tube_top_positioning_method = models.CharField( - max_length=100, - ) - tube_part_inserted = models.CharField(max_length=100) - tube_in_use = models.CharField(max_length=100) - tube_packing_material = models.CharField(max_length=100) - tube_material = models.CharField(max_length=100) - glue = models.CharField(max_length=100) - screen_length = models.CharField(max_length=100) - sock_material = models.CharField(max_length=100) - screen_top_position = models.CharField(max_length=100) - screen_bottom_position = models.CharField(max_length=100) - plain_tube_part_length = models.CharField(max_length=100) + tube_number = models.CharField(max_length=100, null=True) + tube_type = models.CharField(max_length=100, null=True) + artesian_well_cap_present = models.CharField(max_length=100, null=True) + sediment_sump_present = models.CharField(max_length=100, null=True) + number_of_geo_ohm_cables = models.CharField(max_length=100, null=True) + tube_top_diameter = models.CharField(max_length=100, null=True) + variable_diameter = models.CharField(max_length=100, null=True) + tube_status = models.CharField(max_length=100, null=True) + tube_top_position = models.CharField(max_length=100, null=True) + tube_top_positioning_method = models.CharField(max_length=100, null=True) + tube_part_inserted = models.CharField(max_length=100, null=True) + tube_in_use = models.CharField(max_length=100, null=True) + tube_packing_material = models.CharField(max_length=100, null=True) + tube_material = models.CharField(max_length=100, null=True) + glue = models.CharField(max_length=100, null=True) + screen_length = models.CharField(max_length=100, null=True) + sock_material = models.CharField(max_length=100, null=True) + screen_top_position = models.CharField(max_length=100, null=True) + screen_bottom_position = models.CharField(max_length=100, null=True) + plain_tube_part_length = models.CharField(max_length=100, null=True) def __str__(self): return f"{self.gmw}-{self.tube_number}"