Introduce balance field to User model with Alembic migration. Add referral menu, admin /refpay command, and deep link sharing. Update Dockerfile to multi-stage build and add Postgres service to compose. Fix deep link parsing logic and conditional proxy initialization.
33 lines
867 B
Python
33 lines
867 B
Python
"""user -> +balance.
|
|
|
|
Revision ID: f40cab941564
|
|
Revises: 5985b2df0830
|
|
Create Date: 2026-04-10 21:11:15.209314
|
|
|
|
"""
|
|
|
|
from typing import Sequence, Union
|
|
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision: str = "f40cab941564"
|
|
down_revision: Union[str, Sequence[str], None] = "5985b2df0830"
|
|
branch_labels: Union[str, Sequence[str], None] = None
|
|
depends_on: Union[str, Sequence[str], None] = None
|
|
|
|
|
|
def upgrade() -> None:
|
|
"""Upgrade schema."""
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.add_column("users", sa.Column("balance", sa.INTEGER(), nullable=False))
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
def downgrade() -> None:
|
|
"""Downgrade schema."""
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.drop_column("users", "balance")
|
|
# ### end Alembic commands ###
|