@@ -40,12 +40,15 @@ class SampleLocation(Base, AutoBaseMixin):
4040 Geometry (geometry_type = "POINT" , srid = 4326 , spatial_index = True )
4141 )
4242
43- owner_id = Column (Integer , ForeignKey ("owner.id" , ondelete = 'CASCADE' ), nullable = True )
43+ owner_id = Column (
44+ Integer , ForeignKey ("owner.id" , ondelete = "CASCADE" ), nullable = True
45+ )
4446
45- asset_associations = relationship ("AssetLocationAssociation" ,
46- back_populates = "location" ,
47- cascade = "all, delete-orphan"
48- )
47+ asset_associations = relationship (
48+ "AssetLocationAssociation" ,
49+ back_populates = "location" ,
50+ cascade = "all, delete-orphan" ,
51+ )
4952 assets = association_proxy ("asset_associations" , "asset" )
5053
5154
@@ -85,7 +88,9 @@ class Contact(Base, AutoBaseMixin):
8588
8689
8790class Well (Base , AutoBaseMixin ):
88- location_id = Column (Integer , ForeignKey ("sample_location.id" , ondelete = "CASCADE" ), nullable = False )
91+ location_id = Column (
92+ Integer , ForeignKey ("sample_location.id" , ondelete = "CASCADE" ), nullable = False
93+ )
8994
9095 ose_pod_id = Column (String (50 ), nullable = True )
9196 api_id = Column (String (50 ), nullable = True , default = "" ) # API well number
@@ -126,7 +131,7 @@ class Well(Base, AutoBaseMixin):
126131
127132
128133class WellScreen (Base , AutoBaseMixin ):
129- well_id = Column (Integer , ForeignKey ("well.id" , ondelete = ' CASCADE' ), nullable = False )
134+ well_id = Column (Integer , ForeignKey ("well.id" , ondelete = " CASCADE" ), nullable = False )
130135 screen_depth_top = Column (
131136 Float , nullable = False , info = {"unit" : "feet below ground surface" }
132137 )
@@ -149,14 +154,18 @@ class Equipment(Base, AutoBaseMixin):
149154 date_removed = Column (DateTime )
150155 recording_interval = Column (Integer )
151156 equipment_notes = Column (String (50 ))
152- location_id = Column (Integer , ForeignKey ("sample_location.id" , ondelete = "CASCADE" ), nullable = False )
157+ location_id = Column (
158+ Integer , ForeignKey ("sample_location.id" , ondelete = "CASCADE" ), nullable = False
159+ )
153160
154161 location = relationship ("SampleLocation" )
155162
156163
157164class Spring (Base , AutoBaseMixin ):
158165 description = Column (String (255 ), nullable = True )
159- location_id = Column (Integer , ForeignKey ("sample_location.id" , ondelete = "CASCADE" ), nullable = False )
166+ location_id = Column (
167+ Integer , ForeignKey ("sample_location.id" , ondelete = "CASCADE" ), nullable = False
168+ )
160169
161170 # Define a relationship to samplelocations if needed
162171 location = relationship ("SampleLocation" )
@@ -171,8 +180,12 @@ class Group(Base, AutoBaseMixin):
171180
172181
173182class GroupLocationAssociation (Base , AutoBaseMixin ):
174- group_id = Column (Integer , ForeignKey ("group.id" , ondelete = 'CASCADE' ), nullable = False )
175- location_id = Column (Integer , ForeignKey ("sample_location.id" , ondelete = "CASCADE" ), nullable = False )
183+ group_id = Column (
184+ Integer , ForeignKey ("group.id" , ondelete = "CASCADE" ), nullable = False
185+ )
186+ location_id = Column (
187+ Integer , ForeignKey ("sample_location.id" , ondelete = "CASCADE" ), nullable = False
188+ )
176189
177190 # group = relationship("Group")
178191 # location = relationship("SampleLocation")
0 commit comments