@@ -256,7 +256,9 @@ class CLEMImageSeries(SQLModel, table=True): # type: ignore
256256 data_collection_group : Optional ["DataCollectionGroup" ] = Relationship (
257257 back_populates = "clem_image_series"
258258 )
259- dcg_id : Optional [int ] = Field (foreign_key = "datacollectiongroup.id" , default = None )
259+ dcg_id : Optional [int ] = Field (
260+ foreign_key = "datacollectiongroup.dataCollectionGroupId" , default = None
261+ )
260262 dcg_name : Optional [str ] = Field (default = None )
261263
262264 # Link to grid squares
@@ -482,7 +484,7 @@ class DataCollection(SQLModel, table=True): # type: ignore
482484 dataCollectionId : int = Field (primary_key = True , unique = True , alias = "id" )
483485 tag : str = Field (primary_key = True )
484486 dataCollectionGroupId : int = Field (
485- foreign_key = "datacollectiongroup.dataCollectionGroupid " , alias = "dcg_id"
487+ foreign_key = "datacollectiongroup.dataCollectionGroupId " , alias = "dcg_id"
486488 )
487489 data_collection_group : Optional [DataCollectionGroup ] = Relationship (
488490 back_populates = "data_collections"
@@ -578,7 +580,9 @@ class SelectionStash(SQLModel, table=True): # type: ignore
578580
579581
580582class TomographyProcessingParameters (SQLModel , table = True ): # type: ignore
581- dcg_id : int = Field (primary_key = True , foreign_key = "datacollectiongroup.id" )
583+ dcg_id : int = Field (
584+ primary_key = True , foreign_key = "datacollectiongroup.dataCollectionGroupId"
585+ )
582586 pixel_size : float
583587 dose_per_frame : float
584588 frame_count : int
@@ -624,7 +628,7 @@ class AutoProcProgram(SQLModel, table=True): # type: ignore
624628
625629class MurfeyLedger (SQLModel , table = True ): # type: ignore
626630 id : Optional [int ] = Field (primary_key = True , default = None )
627- app_id : int = Field (foreign_key = "autoprocprogram.id " )
631+ app_id : int = Field (foreign_key = "autoprocprogram.autoProcProgramId " )
628632 auto_proc_program : Optional [AutoProcProgram ] = Relationship (
629633 back_populates = "murfey_ids"
630634 )
@@ -678,7 +682,9 @@ class GridSquare(SQLModel, table=True): # type: ignore
678682 foil_holes : List ["FoilHole" ] = Relationship (
679683 back_populates = "grid_square" , sa_relationship_kwargs = {"cascade" : "delete" }
680684 )
681- atlas_id : Optional [int ] = Field (foreign_key = "datacollectiongroup.id" )
685+ atlas_id : Optional [int ] = Field (
686+ foreign_key = "datacollectiongroup.dataCollectionGroupId"
687+ )
682688 scaled_pixel_size : Optional [float ] = None
683689 pixel_location_x : Optional [int ] = None
684690 pixel_location_y : Optional [int ] = None
@@ -751,7 +757,9 @@ class SearchMap(SQLModel, table=True): # type: ignore
751757 tilt_series : List ["TiltSeries" ] = Relationship (
752758 back_populates = "search_map" , sa_relationship_kwargs = {"cascade" : "delete" }
753759 )
754- atlas_id : Optional [int ] = Field (foreign_key = "datacollectiongroup.id" )
760+ atlas_id : Optional [int ] = Field (
761+ foreign_key = "datacollectiongroup.dataCollectionGroupId"
762+ )
755763 scaled_pixel_size : Optional [float ] = None
756764 pixel_location_x : Optional [int ] = None
757765 pixel_location_y : Optional [int ] = None
0 commit comments