Transaction type column

pull/339/head
kompotkot 2021-10-28 12:43:13 +00:00
rodzic 7cf1ef411f
commit 0a771ddfbc
2 zmienionych plików z 3 dodań i 0 usunięć

Wyświetl plik

@ -21,11 +21,13 @@ def upgrade():
op.add_column('ethereum_blocks', sa.Column('base_fee_per_gas', sa.Numeric(precision=78, scale=0), nullable=True))
op.add_column('ethereum_transactions', sa.Column('max_fee_per_gas', sa.Numeric(precision=78, scale=0), nullable=True))
op.add_column('ethereum_transactions', sa.Column('max_priority_fee_per_gas', sa.Numeric(precision=78, scale=0), nullable=True))
op.add_column('ethereum_transactions', sa.Column('transaction_type', sa.Integer(), nullable=True))
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('ethereum_transactions', 'transaction_type')
op.drop_column('ethereum_transactions', 'max_priority_fee_per_gas')
op.drop_column('ethereum_transactions', 'max_fee_per_gas')
op.drop_column('ethereum_blocks', 'base_fee_per_gas')

Wyświetl plik

@ -98,6 +98,7 @@ class EthereumTransaction(Base): # type: ignore
input = Column(Text)
nonce = Column(VARCHAR(256))
transaction_index = Column(BigInteger)
transaction_type = Column(Integer, nullable=True)
value = Column(Numeric(precision=78, scale=0), index=True)
indexed_at = Column(