Skip to content

Commit

Permalink
fix migration imports
Browse files Browse the repository at this point in the history
  • Loading branch information
djeck1432 committed Nov 27, 2024
1 parent 676badd commit 521b638
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

from alembic import op
import sqlalchemy as sa
import sqlalchemy_utils
from shared.constants import ProtocolIDs


# revision identifiers, used by Alembic.
Expand All @@ -25,7 +27,7 @@ def upgrade() -> None:
sa.Column('amount', sa.Numeric(precision=38, scale=18), nullable=False),
sa.Column('event_name', sa.String(), nullable=False),
sa.Column('block_number', sa.Integer(), nullable=False),
sa.Column('protocol_id', sqlalchemy_utils.types.choice.ChoiceType(), nullable=False),
sa.Column('protocol_id', sqlalchemy_utils.types.choice.ChoiceType(ProtocolIDs, impl=sa.String()), nullable=False),
sa.Column('id', sa.UUID(), nullable=False),
sa.PrimaryKeyConstraint('id')
)
Expand All @@ -36,7 +38,7 @@ def upgrade() -> None:
sa.Column('amount', sa.Numeric(precision=38, scale=18), nullable=False),
sa.Column('event_name', sa.String(), nullable=False),
sa.Column('block_number', sa.Integer(), nullable=False),
sa.Column('protocol_id', sqlalchemy_utils.types.choice.ChoiceType(), nullable=False),
sa.Column('protocol_id', sqlalchemy_utils.types.choice.ChoiceType(ProtocolIDs, impl=sa.String()), nullable=False),
sa.Column('id', sa.UUID(), nullable=False),
sa.PrimaryKeyConstraint('id')
)
Expand All @@ -47,7 +49,7 @@ def upgrade() -> None:
sa.Column('amount', sa.Numeric(precision=38, scale=18), nullable=False),
sa.Column('event_name', sa.String(), nullable=False),
sa.Column('block_number', sa.Integer(), nullable=False),
sa.Column('protocol_id', sqlalchemy_utils.types.choice.ChoiceType(), nullable=False),
sa.Column('protocol_id', sqlalchemy_utils.types.choice.ChoiceType(ProtocolIDs, impl=sa.String()), nullable=False),
sa.Column('id', sa.UUID(), nullable=False),
sa.PrimaryKeyConstraint('id')
)
Expand All @@ -59,7 +61,7 @@ def upgrade() -> None:
sa.Column('amount', sa.Numeric(precision=38, scale=18), nullable=False),
sa.Column('event_name', sa.String(), nullable=False),
sa.Column('block_number', sa.Integer(), nullable=False),
sa.Column('protocol_id', sqlalchemy_utils.types.choice.ChoiceType(), nullable=False),
sa.Column('protocol_id', sqlalchemy_utils.types.choice.ChoiceType(ProtocolIDs, impl=sa.String()), nullable=False),
sa.Column('id', sa.UUID(), nullable=False),
sa.PrimaryKeyConstraint('id')
)
Expand Down

0 comments on commit 521b638

Please sign in to comment.