97ea17c0c1
025_module_toggles pointed to '024_bot_trades_released_at' but 024's revision ID is just '024'. 026 pointed to '025' but 025's ID is '025_module_toggles'. Both breaks caused 'alembic upgrade head' to fail with KeyError on any fresh Postgres install — a launch blocker. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
26 lines
702 B
Python
26 lines
702 B
Python
"""add trump_enabled and macro_enabled to subscriptions
|
|
|
|
Revision ID: 025_module_toggles
|
|
Revises: 024_bot_trades_released_at
|
|
Create Date: 2026-05-27
|
|
"""
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
revision = '025_module_toggles'
|
|
down_revision = '024'
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade() -> None:
|
|
op.add_column('subscriptions',
|
|
sa.Column('trump_enabled', sa.Boolean(), nullable=False, server_default='false'))
|
|
op.add_column('subscriptions',
|
|
sa.Column('macro_enabled', sa.Boolean(), nullable=False, server_default='false'))
|
|
|
|
|
|
def downgrade() -> None:
|
|
op.drop_column('subscriptions', 'macro_enabled')
|
|
op.drop_column('subscriptions', 'trump_enabled')
|