feat: /sync settings page with price multiplier and description postfix

Adds price_multiplier and description_postfix to SyncConfig. The sync
page at /sync lets users configure them. vk_sync reads these per-user
settings and applies the multiplier to price and appends the postfix
as "(postfix)" to the VK product description.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
mguschin
2026-05-12 23:04:23 +03:00
parent fb3b6e2327
commit e169a91146
6 changed files with 142 additions and 6 deletions

View File

@@ -0,0 +1,18 @@
"""Add price_multiplier and description_postfix to sync_configs."""
revision = "0008"
down_revision = "0007"
branch_labels = None
depends_on = None
import sqlalchemy as sa
from alembic import op
def upgrade():
op.add_column("sync_configs", sa.Column("price_multiplier", sa.Numeric(10, 4), nullable=False, server_default="1.0"))
op.add_column("sync_configs", sa.Column("description_postfix", sa.String(255), nullable=True))
def downgrade():
op.drop_column("sync_configs", "description_postfix")
op.drop_column("sync_configs", "price_multiplier")