"""Add column account_balance to Trades

Revision ID: 6bfefffc7e71
Revises: 53cbb66861d9
Create Date: 2022-04-07 21:44:38.031260

"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql

# revision identifiers, used by Alembic.
revision = '6bfefffc7e71'
down_revision = '53cbb66861d9'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column('quantfury_orders', 'price', existing_type=sa.NUMERIC(), nullable=False)
    op.add_column('quantfury_positions', sa.Column('account_balance', sa.Numeric(), nullable=True))
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column('quantfury_positions', 'account_balance')
    op.alter_column('quantfury_orders', 'price', existing_type=sa.NUMERIC(), nullable=True)
    # ### end Alembic commands ###
