1- __schema_version__ = "4.6 .0"
1+ __schema_version__ = "4.7 .0"
22import datetime
33import decimal
44from typing import List , Optional
@@ -3804,6 +3804,8 @@ class Shipping(Base):
38043804 ForeignKeyConstraint (
38053805 ["deliveryAgent_flightCodePersonId" ],
38063806 ["Person.personId" ],
3807+ ondelete = "SET NULL" ,
3808+ onupdate = "CASCADE" ,
38073809 name = "Shipping_ibfk_4" ,
38083810 ),
38093811 ForeignKeyConstraint (
@@ -3816,14 +3818,14 @@ class Shipping(Base):
38163818 ForeignKeyConstraint (
38173819 ["returnLabContactId" ],
38183820 ["LabContact.labContactId" ],
3819- ondelete = "CASCADE " ,
3821+ ondelete = "SET NULL " ,
38203822 onupdate = "CASCADE" ,
38213823 name = "Shipping_ibfk_3" ,
38223824 ),
38233825 ForeignKeyConstraint (
38243826 ["sendingLabContactId" ],
38253827 ["LabContact.labContactId" ],
3826- ondelete = "CASCADE " ,
3828+ ondelete = "SET NULL " ,
38273829 onupdate = "CASCADE" ,
38283830 name = "Shipping_ibfk_2" ,
38293831 ),
@@ -4166,6 +4168,7 @@ class DewarRegistryHasProposal(Base):
41664168 ForeignKeyConstraint (
41674169 ["labContactId" ],
41684170 ["LabContact.labContactId" ],
4171+ ondelete = "SET NULL" ,
41694172 onupdate = "CASCADE" ,
41704173 name = "DewarRegistry_has_Proposal_ibfk4" ,
41714174 ),
@@ -4677,6 +4680,9 @@ class BLSample(Base):
46774680 BLSampleImage : Mapped [List ["BLSampleImage" ]] = relationship (
46784681 "BLSampleImage" , back_populates = "BLSample"
46794682 )
4683+ BLSamplePosition : Mapped [List ["BLSamplePosition" ]] = relationship (
4684+ "BLSamplePosition" , back_populates = "BLSample"
4685+ )
46804686 BLSample_has_DataCollectionPlan : Mapped [List ["BLSampleHasDataCollectionPlan" ]] = (
46814687 relationship ("BLSampleHasDataCollectionPlan" , back_populates = "BLSample" )
46824688 )
@@ -4707,6 +4713,9 @@ class BLSample(Base):
47074713 XFEFluorescenceSpectrum : Mapped [List ["XFEFluorescenceSpectrum" ]] = relationship (
47084714 "XFEFluorescenceSpectrum" , back_populates = "BLSample"
47094715 )
4716+ XrayCentringResult : Mapped [List ["XrayCentringResult" ]] = relationship (
4717+ "XrayCentringResult" , back_populates = "BLSample"
4718+ )
47104719 BLSample_has_EnergyScan : Mapped [List ["BLSampleHasEnergyScan" ]] = relationship (
47114720 "BLSampleHasEnergyScan" , back_populates = "BLSample"
47124721 )
@@ -4962,6 +4971,39 @@ class BLSampleImage(Base):
49624971 )
49634972
49644973
4974+ class BLSamplePosition (Base ):
4975+ __tablename__ = "BLSamplePosition"
4976+ __table_args__ = (
4977+ ForeignKeyConstraint (
4978+ ["blSampleId" ],
4979+ ["BLSample.blSampleId" ],
4980+ name = "BLSamplePosition_fk_blSampleId" ,
4981+ ),
4982+ Index ("BLSamplePosition_fk_blSampleId" , "blSampleId" ),
4983+ )
4984+
4985+ blSamplePositionId : Mapped [int ] = mapped_column (
4986+ INTEGER (11 ), primary_key = True , comment = "Primary key (auto-incremented)"
4987+ )
4988+ blSampleId : Mapped [int ] = mapped_column (
4989+ INTEGER (11 ), comment = "FK, references parent sample"
4990+ )
4991+ posX : Mapped [Optional [decimal .Decimal ]] = mapped_column (Double (asdecimal = True ))
4992+ posY : Mapped [Optional [decimal .Decimal ]] = mapped_column (Double (asdecimal = True ))
4993+ posZ : Mapped [Optional [decimal .Decimal ]] = mapped_column (Double (asdecimal = True ))
4994+ recordTimeStamp : Mapped [Optional [datetime .datetime ]] = mapped_column (
4995+ DateTime , comment = "Creation or last update date/time"
4996+ )
4997+ positionType : Mapped [Optional [str ]] = mapped_column (
4998+ Enum ("dispensing" ),
4999+ comment = "Type of marked position (e.g.: dispensing location)" ,
5000+ )
5001+
5002+ BLSample : Mapped ["BLSample" ] = relationship (
5003+ "BLSample" , back_populates = "BLSamplePosition"
5004+ )
5005+
5006+
49655007class BLSampleHasDataCollectionPlan (Base ):
49665008 __tablename__ = "BLSample_has_DataCollectionPlan"
49675009 __table_args__ = (
@@ -6221,13 +6263,21 @@ class XFEFluorescenceSpectrum(Base):
62216263class XrayCentringResult (Base ):
62226264 __tablename__ = "XrayCentringResult"
62236265 __table_args__ = (
6266+ ForeignKeyConstraint (
6267+ ["blSampleId" ],
6268+ ["BLSample.blSampleId" ],
6269+ ondelete = "SET NULL" ,
6270+ onupdate = "CASCADE" ,
6271+ name = "XrayCentringResult_fk_blSampleId" ,
6272+ ),
62246273 ForeignKeyConstraint (
62256274 ["xrayCentringId" ],
62266275 ["XrayCentring.xrayCentringId" ],
62276276 ondelete = "CASCADE" ,
62286277 onupdate = "CASCADE" ,
62296278 name = "XrayCentringResult_ibfk_1" ,
62306279 ),
6280+ Index ("XrayCentringResult_fk_blSampleId" , "blSampleId" ),
62316281 Index ("xrayCentringId" , "xrayCentringId" ),
62326282 {"comment" : "Xray Centring result." },
62336283 )
@@ -6297,7 +6347,14 @@ class XrayCentringResult(Base):
62976347 gridInfoId : Mapped [Optional [int ]] = mapped_column (
62986348 INTEGER (11 ), comment = "to be removed"
62996349 )
6350+ blSampleId : Mapped [Optional [int ]] = mapped_column (
6351+ INTEGER (11 ),
6352+ comment = "The BLSample attributed for this x-ray centring result, i.e. the actual sample even for multi-pins" ,
6353+ )
63006354
6355+ BLSample : Mapped ["BLSample" ] = relationship (
6356+ "BLSample" , back_populates = "XrayCentringResult"
6357+ )
63016358 XrayCentring : Mapped ["XrayCentring" ] = relationship (
63026359 "XrayCentring" , back_populates = "XrayCentringResult"
63036360 )
@@ -8449,6 +8506,14 @@ class ParticleClassification(Base):
84498506 Float ,
84508507 comment = "Quadratic coefficient of quadratic fit to refinement resolution against the logarithm of the number of particles" ,
84518508 )
8509+ angularEfficiency : Mapped [Optional [decimal .Decimal ]] = mapped_column (
8510+ Double (asdecimal = True ),
8511+ comment = "Variation in resolution across different angles, 1-2sig/mean" ,
8512+ )
8513+ suggestedTilt : Mapped [Optional [decimal .Decimal ]] = mapped_column (
8514+ Double (asdecimal = True ),
8515+ comment = "Suggested stage tilt angle to improve angular efficiency. Unit: degrees" ,
8516+ )
84528517
84538518 CryoemInitialModel : Mapped [List ["CryoemInitialModel" ]] = relationship (
84548519 "CryoemInitialModel" ,
0 commit comments