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>
19 lines
566 B
Python
19 lines
566 B
Python
"""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")
|