Merge pull request #1078 from moonstream-to/eng-chain-bn

Chain ID is big int
pull/1079/head
Sergei Sumarokov 2024-06-03 10:37:27 +03:00 zatwierdzone przez GitHub
commit a1e3bb44fe
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
2 zmienionych plików z 35 dodań i 1 usunięć

Wyświetl plik

@ -0,0 +1,34 @@
"""Chain ID is big int
Revision ID: a9060d0527e3
Revises: 7191eb70e99e
Create Date: 2024-06-03 07:32:28.111259
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'a9060d0527e3'
down_revision = '7191eb70e99e'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.alter_column('blockchains', 'chain_id',
existing_type=sa.INTEGER(),
type_=sa.BigInteger(),
existing_nullable=False)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.alter_column('blockchains', 'chain_id',
existing_type=sa.BigInteger(),
type_=sa.INTEGER(),
existing_nullable=False)
# ### end Alembic commands ###

Wyświetl plik

@ -215,7 +215,7 @@ class Blockchain(Base): # type: ignore
unique=True,
)
name = Column(VARCHAR(128), nullable=False, index=True, unique=True)
chain_id = Column(Integer, nullable=False, index=True, unique=False)
chain_id = Column(BigInteger, nullable=False, index=True, unique=False)
testnet = Column(Boolean, default=False, nullable=False)
registered_contracts = relationship(