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:
18
web/migrations/versions/0008_sync_config_price_postfix.py
Normal file
18
web/migrations/versions/0008_sync_config_price_postfix.py
Normal 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")
|
||||
Reference in New Issue
Block a user