From 63b2f68f292f3da3fc61dd9a794a8b659f426b52 Mon Sep 17 00:00:00 2001 From: Andrey Dolgolev Date: Mon, 11 Oct 2021 18:34:13 +0300 Subject: [PATCH] Change models. --- db/moonstreamdb/models.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/db/moonstreamdb/models.py b/db/moonstreamdb/models.py index 8ac86ab4..a3fada13 100644 --- a/db/moonstreamdb/models.py +++ b/db/moonstreamdb/models.py @@ -144,9 +144,13 @@ class EthereumLabel(Base): # type: ignore nullable=False, ) label = Column(VARCHAR(256), nullable=False, index=True) - address_id = Column( - Integer, - ForeignKey("ethereum_addresses.id", ondelete="CASCADE"), + block_number = Column( + BigInteger, + nullable=True, + index=True, + ) + address = Column( + VARCHAR(256), nullable=True, index=True, )