Add description about index.

pull/599/head
Andrey Dolgolev 2022-05-05 12:12:21 +03:00
rodzic e589972b6a
commit 0b0629c56b
1 zmienionych plików z 15 dodań i 30 usunięć

Wyświetl plik

@ -132,21 +132,9 @@ class EthereumLabel(Base): # type: ignore
nullable=False,
)
label = Column(VARCHAR(256), nullable=False, index=True)
block_number = Column(
BigInteger,
nullable=True,
index=True,
)
address = Column(
VARCHAR(256),
nullable=True,
index=True,
)
transaction_hash = Column(
VARCHAR(256),
nullable=True,
index=True,
)
block_number = Column(BigInteger, nullable=True, index=True,)
address = Column(VARCHAR(256), nullable=True, index=True,)
transaction_hash = Column(VARCHAR(256), nullable=True, index=True,)
label_data = Column(JSONB, nullable=True)
block_timestamp = Column(BigInteger, index=True)
log_index = Column(Integer, nullable=True)
@ -238,21 +226,9 @@ class PolygonLabel(Base): # type: ignore
nullable=False,
)
label = Column(VARCHAR(256), nullable=False, index=True)
block_number = Column(
BigInteger,
nullable=True,
index=True,
)
address = Column(
VARCHAR(256),
nullable=True,
index=True,
)
transaction_hash = Column(
VARCHAR(256),
nullable=True,
index=True,
)
block_number = Column(BigInteger, nullable=True, index=True,)
address = Column(VARCHAR(256), nullable=True, index=True,)
transaction_hash = Column(VARCHAR(256), nullable=True, index=True,)
label_data = Column(JSONB, nullable=True)
block_timestamp = Column(BigInteger, index=True)
log_index = Column(Integer, nullable=True)
@ -260,6 +236,15 @@ class PolygonLabel(Base): # type: ignore
DateTime(timezone=True), server_default=utcnow(), nullable=False
)
# Undescribed indexes
"""
Migration: alembic\versions\5f5b8f19570f_added_index_for_address_type_and_name_.py
Index: "polygon_labels_address_type_and_name_idx" created manually.
By fields: (address, label, (label_data->>'type'), (label_data->>'name'))
Reason: https://github.com/sqlalchemy/alembic/issues/469#issuecomment-441887478
"""
class ESDFunctionSignature(Base): # type: ignore
"""