mirror of
https://github.com/freqtrade/freqtrade.git
synced 2026-02-06 06:10:24 +00:00
Fix a few sql gotchas
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user