mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
Fix a few sql gotchas
This commit is contained in:
parent
790c7e386a
commit
8364a704d6
|
@ -24,6 +24,7 @@ class _CustomData(ModelBase):
|
|||
- One metadata entry can only be associated with one Trade
|
||||
"""
|
||||
__tablename__ = 'trade_custom_data'
|
||||
__allow_unmapped__ = True
|
||||
session: ClassVar[SessionType]
|
||||
|
||||
# Uniqueness should be ensured over pair, order_id
|
||||
|
|
|
@ -1485,7 +1485,7 @@ class Trade(ModelBase, LocalTrade):
|
|||
"Order", order_by="Order.id", cascade="all, delete-orphan", lazy="selectin",
|
||||
innerjoin=True) # type: ignore
|
||||
custom_data: Mapped[List[_CustomData]] = relationship(
|
||||
"CustomData", order_by="CustomData.id", cascade="all, delete-orphan",
|
||||
"_CustomData", cascade="all, delete-orphan",
|
||||
lazy="raise") # type: ignore
|
||||
|
||||
exchange: Mapped[str] = mapped_column(String(25), nullable=False) # type: ignore
|
||||
|
|
Loading…
Reference in New Issue
Block a user