RoundConfig.min_amount_sats was an independently-configurable floor that could drift out of sync with bet_amount_sats for no real reason (deposits never had a server-side minimum anyway). Drop the field and enforce amount_sats >= config.bet_amount_sats directly in request_withdrawal. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
32 lines
947 B
Python
32 lines
947 B
Python
"""drop min_amount_sats, withdrawal minimum now equals bet amount
|
|
|
|
Revision ID: 6cb50b29f64c
|
|
Revises: 5f2079b95b33
|
|
Create Date: 2026-07-22 16:50:38.765233
|
|
|
|
"""
|
|
from typing import Sequence, Union
|
|
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision: str = '6cb50b29f64c'
|
|
down_revision: Union[str, Sequence[str], None] = '5f2079b95b33'
|
|
branch_labels: Union[str, Sequence[str], None] = None
|
|
depends_on: Union[str, Sequence[str], None] = None
|
|
|
|
|
|
def upgrade() -> None:
|
|
"""Upgrade schema."""
|
|
with op.batch_alter_table('round_config') as batch_op:
|
|
batch_op.drop_column('min_amount_sats')
|
|
|
|
|
|
def downgrade() -> None:
|
|
"""Downgrade schema."""
|
|
with op.batch_alter_table('round_config') as batch_op:
|
|
batch_op.add_column(sa.Column('min_amount_sats', sa.BigInteger(), nullable=False, server_default='100000000'))
|
|
batch_op.alter_column('min_amount_sats', server_default=None)
|