Skip to content

Commit

Permalink
Merge pull request #1110 from moonstream-to/add-topic3
Browse files Browse the repository at this point in the history
Add topic 3.
  • Loading branch information
Andrei-Dolgolev authored Jul 11, 2024
2 parents accdeba + 3b0495f commit 541a55f
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
"""Add topic 3
Revision ID: 27086791044c
Revises: e02c90ea67bb
Create Date: 2024-07-11 13:15:45.273275
"""

from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision: str = "27086791044c"
down_revision: Union[str, None] = "e02c90ea67bb"
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(
"arbitrum_one_logs", sa.Column("topic3", sa.VARCHAR(length=256), nullable=True)
)
op.add_column(
"arbitrum_sepolia_logs",
sa.Column("topic3", sa.VARCHAR(length=256), nullable=True),
)
op.add_column(
"ethereum_logs", sa.Column("topic3", sa.VARCHAR(length=256), nullable=True)
)
op.add_column(
"game7_orbit_arbitrum_sepolia_logs",
sa.Column("topic3", sa.VARCHAR(length=256), nullable=True),
)
op.add_column(
"mantle_logs", sa.Column("topic3", sa.VARCHAR(length=256), nullable=True)
)
op.add_column(
"mantle_sepolia_logs",
sa.Column("topic3", sa.VARCHAR(length=256), nullable=True),
)
op.add_column(
"polygon_logs", sa.Column("topic3", sa.VARCHAR(length=256), nullable=True)
)
op.add_column(
"xai_logs", sa.Column("topic3", sa.VARCHAR(length=256), nullable=True)
)
op.add_column(
"xai_sepolia_logs", sa.Column("topic3", sa.VARCHAR(length=256), nullable=True)
)
# ### end Alembic commands ###


def downgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column("xai_sepolia_logs", "topic3")
op.drop_column("xai_logs", "topic3")
op.drop_column("polygon_logs", "topic3")
op.drop_column("mantle_sepolia_logs", "topic3")
op.drop_column("mantle_logs", "topic3")
op.drop_column("game7_orbit_arbitrum_sepolia_logs", "topic3")
op.drop_column("ethereum_logs", "topic3")
op.drop_column("arbitrum_sepolia_logs", "topic3")
op.drop_column("arbitrum_one_logs", "topic3")
# ### end Alembic commands ###
1 change: 1 addition & 0 deletions moonstreamdb-v3/moonstreamdbv3/models_indexes.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ class EvmBasedLogs(Base):
selector = Column(VARCHAR(256), nullable=True, index=False)
topic1 = Column(VARCHAR(256), nullable=True, index=False)
topic2 = Column(VARCHAR(256), nullable=True, index=False)
topic3 = Column(VARCHAR(256), nullable=True, index=False)
log_index = Column(BigInteger, nullable=False, index=False)
path = Column(Text, nullable=False)
indexed_at = Column(
Expand Down
2 changes: 1 addition & 1 deletion moonstreamdb-v3/moonstreamdbv3/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.11
0.0.12

0 comments on commit 541a55f

Please sign in to comment.