Difficulty big int out of range, switched to varchar

pull/613/head
kompotkot 2022-05-23 13:53:34 +00:00
rodzic 754e532b7c
commit 311c627af8
2 zmienionych plików z 5 dodań i 5 usunięć

Wyświetl plik

@ -1,8 +1,8 @@
"""xdai model
Revision ID: e06d43f8f032
Revision ID: 2fa541f6f6fc
Revises: 5f5b8f19570f
Create Date: 2022-05-23 13:29:06.753274
Create Date: 2022-05-23 13:52:57.937566
"""
from alembic import op
@ -10,7 +10,7 @@ import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
# revision identifiers, used by Alembic.
revision = 'e06d43f8f032'
revision = '2fa541f6f6fc'
down_revision = '5f5b8f19570f'
branch_labels = None
depends_on = None
@ -21,7 +21,7 @@ def upgrade():
op.create_table('xdai_blocks',
sa.Column('author', sa.VARCHAR(length=128), nullable=True),
sa.Column('block_number', sa.BigInteger(), nullable=False),
sa.Column('difficulty', sa.BigInteger(), nullable=True),
sa.Column('difficulty', sa.VARCHAR(length=128), nullable=True),
sa.Column('extra_data', sa.VARCHAR(length=128), nullable=True),
sa.Column('gas_limit', sa.BigInteger(), nullable=True),
sa.Column('gas_used', sa.BigInteger(), nullable=True),

Wyświetl plik

@ -277,7 +277,7 @@ class XDaiBlock(Base): # type: ignore
block_number = Column(
BigInteger, primary_key=True, unique=True, nullable=False, index=True
)
difficulty = Column(BigInteger)
difficulty = Column(VARCHAR(128))
extra_data = Column(VARCHAR(128))
gas_limit = Column(BigInteger)
gas_used = Column(BigInteger)