database store graph

This commit is contained in:
2023-03-16 15:07:43 +08:00
parent 9435484e3f
commit 082864814b
11 changed files with 62 additions and 31 deletions

3
orm.py
View File

@@ -46,6 +46,7 @@ class Experiment(Base):
# variables
n_max_trial = Column(Integer, nullable=False)
dct_lst_init_remove_firm_prod = Column(PickleType, nullable=False)
g_bom = Column(Text(4294000000), nullable=False)
sample = relationship('Sample', back_populates='experiment', lazy='dynamic')
@@ -65,7 +66,7 @@ class Sample(Base):
ts_done = Column(DateTime(timezone=True), onupdate=func.now())
stop_t = Column(Integer, nullable=True)
firm_network = Column(Text(4294000000), nullable=True)
g_firm = Column(Text(4294000000), nullable=True)
experiment = relationship('Experiment', back_populates='sample', uselist=False)
result = relationship('Result', back_populates='sample', lazy='dynamic')