Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaminar-i committed Nov 2, 2024
1 parent dd9d580 commit fe4b7bf
Showing 1 changed file with 16 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
Revises: 64a870953fa5
Create Date: 2024-11-01 10:53:33.024930
This migration adds the necessary tables and relationships for tracking ZkLend events
in the system, including event tracking, transaction details and related metadata.
"""
from typing import Sequence, Union

Expand All @@ -21,6 +23,14 @@


def upgrade() -> None:
"""Upgrade the database schema to include ZkLend events.
Creates new tables and relationships required for storing ZkLend event data,
including:
- Event tracking
- Transaction details
- Related metadata
"""
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('accumulators_sync_event',
sa.Column('token', sa.String(), nullable=False),
Expand Down Expand Up @@ -116,6 +126,11 @@ def upgrade() -> None:


def downgrade() -> None:
"""Revert the database schema changes for ZkLend events.
Removes tables and relationships that were added for ZkLend event tracking,
restoring the database to its previous state.
"""
# ### commands auto generated by Alembic - please adjust! ###
op.drop_index(op.f('ix_withdrawal_event_event_name'), table_name='withdrawal_event')
op.drop_index(op.f('ix_withdrawal_event_block_number'), table_name='withdrawal_event')
Expand All @@ -138,4 +153,4 @@ def downgrade() -> None:
op.drop_index(op.f('ix_accumulators_sync_event_event_name'), table_name='accumulators_sync_event')
op.drop_index(op.f('ix_accumulators_sync_event_block_number'), table_name='accumulators_sync_event')
op.drop_table('accumulators_sync_event')
# ### end Alembic commands ###
# ### end Alembic commands ###

0 comments on commit fe4b7bf

Please sign in to comment.