Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
vestor-dev committed Nov 25, 2024
1 parent e4dbff2 commit 71a21a8
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions web_app/alembic/versions/1a6fada80369_add_postion_columns.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@


# Revision identifiers, used by Alembic.
revision = '1a6fada80369'
down_revision = '0537a9a5e841'
revision = "1a6fada80369"
down_revision = "0537a9a5e841"
branch_labels = None
depends_on = None

Expand All @@ -34,10 +34,12 @@ def upgrade() -> None:
- `is_liquidated`: A boolean field to indicate if the position has been liquidated.
- `datetime_liquidation`: A datetime field to record when the liquidation occurred.
"""
op.add_column('position', sa.Column('is_protection', sa.Boolean(), nullable=True))
op.add_column('position', sa.Column('liquidation_bonus', sa.Float(), nullable=True))
op.add_column('position', sa.Column('is_liquidated', sa.Boolean(), nullable=True))
op.add_column('position', sa.Column('datetime_liquidation', sa.DateTime(), nullable=False))
op.add_column("position", sa.Column("is_protection", sa.Boolean(), nullable=True))
op.add_column("position", sa.Column("liquidation_bonus", sa.Float(), nullable=True))
op.add_column("position", sa.Column("is_liquidated", sa.Boolean(), nullable=True))
op.add_column(
"position", sa.Column("datetime_liquidation", sa.DateTime(), nullable=False)
)


def downgrade() -> None:
Expand All @@ -50,7 +52,7 @@ def downgrade() -> None:
- `is_liquidated`
- `datetime_liquidation`
"""
op.drop_column('position', 'datetime_liquidation')
op.drop_column('position', 'is_liquidated')
op.drop_column('position', 'liquidation_bonus')
op.drop_column('position', 'is_protection')
op.drop_column("position", "datetime_liquidation")
op.drop_column("position", "is_liquidated")
op.drop_column("position", "liquidation_bonus")
op.drop_column("position", "is_protection")

0 comments on commit 71a21a8

Please sign in to comment.