31 lines
924 B
Python
31 lines
924 B
Python
|
|
"""add signal execution tracking fields
|
||
|
|
|
||
|
|
Revision ID: a1b2c3d4e5f6
|
||
|
|
Revises: 6c09aa4368e5
|
||
|
|
Create Date: 2026-02-19 14:00:00.000000
|
||
|
|
|
||
|
|
"""
|
||
|
|
from typing import Sequence, Union
|
||
|
|
|
||
|
|
from alembic import op
|
||
|
|
import sqlalchemy as sa
|
||
|
|
|
||
|
|
|
||
|
|
# revision identifiers, used by Alembic.
|
||
|
|
revision: str = 'a1b2c3d4e5f6'
|
||
|
|
down_revision: Union[str, None] = '6c09aa4368e5'
|
||
|
|
branch_labels: Union[str, Sequence[str], None] = None
|
||
|
|
depends_on: Union[str, Sequence[str], None] = None
|
||
|
|
|
||
|
|
|
||
|
|
def upgrade() -> None:
|
||
|
|
op.add_column('signals', sa.Column('executed_price', sa.Numeric(precision=12, scale=2), nullable=True))
|
||
|
|
op.add_column('signals', sa.Column('executed_quantity', sa.Integer(), nullable=True))
|
||
|
|
op.add_column('signals', sa.Column('executed_at', sa.DateTime(), nullable=True))
|
||
|
|
|
||
|
|
|
||
|
|
def downgrade() -> None:
|
||
|
|
op.drop_column('signals', 'executed_at')
|
||
|
|
op.drop_column('signals', 'executed_quantity')
|
||
|
|
op.drop_column('signals', 'executed_price')
|