Add delete cascade to alchemy model
This commit is contained in:
parent
1a305ea8b0
commit
da2a515d0b
@ -183,7 +183,7 @@ class Trade(_DECL_BASE):
|
|||||||
|
|
||||||
id = Column(Integer, primary_key=True)
|
id = Column(Integer, primary_key=True)
|
||||||
|
|
||||||
orders = relationship("Order", order_by="Order.id")
|
orders = relationship("Order", order_by="Order.id", cascade="all, delete-orphan")
|
||||||
|
|
||||||
exchange = Column(String, nullable=False)
|
exchange = Column(String, nullable=False)
|
||||||
pair = Column(String, nullable=False, index=True)
|
pair = Column(String, nullable=False, index=True)
|
||||||
|
Loading…
Reference in New Issue
Block a user