diff --git a/moonstreamdb-v3/moonstreamdbv3/alembic_indexes/versions/6807bdf6f417_add_deploy_block.py b/moonstreamdb-v3/moonstreamdbv3/alembic_indexes/versions/6807bdf6f417_add_deploy_block.py new file mode 100644 index 00000000..8b58872f --- /dev/null +++ b/moonstreamdb-v3/moonstreamdbv3/alembic_indexes/versions/6807bdf6f417_add_deploy_block.py @@ -0,0 +1,34 @@ +"""Add deploy block + +Revision ID: 6807bdf6f417 +Revises: 48d2562504d1 +Create Date: 2024-08-23 16:51:47.147758 + +""" + +from typing import Sequence, Union + +from alembic import op +import sqlalchemy as sa + + +# revision identifiers, used by Alembic. +revision: str = "6807bdf6f417" +down_revision: Union[str, None] = "25b339f55f8f" +branch_labels: Union[str, Sequence[str], None] = None +depends_on: Union[str, Sequence[str], None] = None + + +def upgrade() -> None: + # ### commands auto generated by Alembic - please adjust! ### + op.add_column( + "abi_jobs", + sa.Column("deployment_block_number", sa.BigInteger(), nullable=True), + ) + # ### end Alembic commands ### + + +def downgrade() -> None: + # ### commands auto generated by Alembic - please adjust! ### + op.drop_column("abi_jobs", "deployment_block_number") + # ### end Alembic commands ### diff --git a/moonstreamdb-v3/moonstreamdbv3/models_indexes.py b/moonstreamdb-v3/moonstreamdbv3/models_indexes.py index 30681e4c..89d015df 100644 --- a/moonstreamdb-v3/moonstreamdbv3/models_indexes.py +++ b/moonstreamdb-v3/moonstreamdbv3/models_indexes.py @@ -818,6 +818,7 @@ class AbiJobs(Base): historical_crawl_status = Column(VARCHAR(256), nullable=False, index=True) progress = Column(Integer, nullable=False, index=False) moonworm_task_pickedup = Column(Boolean, nullable=False, index=False) + deployment_block_number = Column(BigInteger, nullable=True, index=False) abi = Column(Text, nullable=False) created_at = Column( DateTime(timezone=True), server_default=utcnow(), nullable=False diff --git a/moonstreamdb-v3/moonstreamdbv3/version.txt b/moonstreamdb-v3/moonstreamdbv3/version.txt index 32786aa4..44517d51 100644 --- a/moonstreamdb-v3/moonstreamdbv3/version.txt +++ b/moonstreamdb-v3/moonstreamdbv3/version.txt @@ -1 +1 @@ -0.0.18 +0.0.19