Skip to content

Commit 24889e1

Browse files
Back-populate bfactor table into processing job (#821)
1 parent 39c27c6 commit 24889e1

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/murfey/util/db.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -469,6 +469,12 @@ class ProcessingJob(SQLModel, table=True): # type: ignore
469469
refine3ds: List["Refine3D"] = Relationship(
470470
back_populates="processing_job", sa_relationship_kwargs={"cascade": "delete"}
471471
)
472+
bfactor_parameters: List["BFactorParameters"] = Relationship(
473+
back_populates="processing_job", sa_relationship_kwargs={"cascade": "delete"}
474+
)
475+
bfactors: List["BFactors"] = Relationship(
476+
back_populates="processing_job", sa_relationship_kwargs={"cascade": "delete"}
477+
)
472478

473479

474480
class PreprocessStash(SQLModel, table=True): # type: ignore
@@ -862,13 +868,17 @@ class BFactorParameters(SQLModel, table=True): # type: ignore
862868
class_number: int
863869
mask_file: str
864870
run: bool = True
871+
processing_job: Optional[ProcessingJob] = Relationship(
872+
back_populates="bfactor_parameters"
873+
)
865874

866875

867876
class BFactors(SQLModel, table=True): # type: ignore
868877
bfactor_directory: str = Field(primary_key=True)
869878
pj_id: int = Field(primary_key=True, foreign_key="processingjob.processingJobId")
870879
number_of_particles: int
871880
resolution: float
881+
processing_job: Optional[ProcessingJob] = Relationship(back_populates="bfactors")
872882

873883

874884
class MotionCorrection(SQLModel, table=True): # type: ignore

0 commit comments

Comments
 (0)