Skip to content

Commit ed7960a

Browse files
committed
fix: add notes fields to well and thing models
1 parent 4cebedb commit ed7960a

3 files changed

Lines changed: 11 additions & 1 deletion

File tree

db/thing.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ class Thing(Base, AutoBaseMixin, ReleaseMixin, StatusHistoryMixin, PermissionMix
5252
nullable=True,
5353
comment="To audit where the data came from in NM_Aquifer if it was transferred over",
5454
)
55+
notes = mapped_column(Text, nullable=True)
56+
measuring_notes = mapped_column(Text, nullable=True)
57+
water_notes = mapped_column(Text, nullable=True)
5558

5659
# TODO: should `name` be unique?
5760
name: Mapped[str] = mapped_column(

schemas/thing.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,10 @@ class WellResponse(BaseThingResponse):
154154
well_casing_materials: list[CasingMaterial] = []
155155
well_construction_notes: str | None = None
156156

157+
water_notes: str | None = None
158+
measuring_notes: str | None = None
159+
notes: str | None = None
160+
157161
@field_validator("well_purposes", mode="before")
158162
def populate_well_purposes_with_strings(cls, well_purposes):
159163
if well_purposes is not None:

tests/features/environment.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
Deployment,
3030
TransducerObservationBlock,
3131
)
32-
3332
from db.engine import session_ctx
3433

3534

@@ -78,6 +77,9 @@ def add_well(context, session, location, name_num):
7877
well_construction_notes="Test well construction notes",
7978
well_casing_diameter=5.0,
8079
well_casing_depth=10.0,
80+
notes="These are some test well notes",
81+
measuring_notes="These are some measuring notes",
82+
water_notes="This are some water notes",
8183
)
8284
session.add(well)
8385
session.commit()
@@ -203,6 +205,7 @@ def add_transducer_observation(context, session, block, deployment_id, value):
203205
def before_all(context):
204206
context.objects = {}
205207
rebuild = False
208+
# rebuild = True
206209
with session_ctx() as session:
207210
if rebuild:
208211
erase_and_rebuild_db(session)

0 commit comments

Comments
 (0)