34 lines
959 B
Python
34 lines
959 B
Python
|
|
"""add seen decision and price_at_decision
|
||
|
|
|
||
|
|
Revision ID: f7a8b9c0d1e2
|
||
|
|
Revises: d6e7f8a9b0c1
|
||
|
|
Create Date: 2026-05-16 00:00:00.000000
|
||
|
|
|
||
|
|
Adds support for the soft-hide "seen" decision type. The decision column is
|
||
|
|
already a free string, so no schema change is needed for the enum value; we
|
||
|
|
only need to add price_at_decision so the client can resurface listings
|
||
|
|
whose price has changed since the user marked them seen.
|
||
|
|
"""
|
||
|
|
from typing import Sequence, Union
|
||
|
|
|
||
|
|
from alembic import op
|
||
|
|
import sqlalchemy as sa
|
||
|
|
|
||
|
|
|
||
|
|
# revision identifiers, used by Alembic.
|
||
|
|
revision: str = 'f7a8b9c0d1e2'
|
||
|
|
down_revision: Union[str, None] = 'd6e7f8a9b0c1'
|
||
|
|
branch_labels: Union[str, Sequence[str], None] = None
|
||
|
|
depends_on: Union[str, Sequence[str], None] = None
|
||
|
|
|
||
|
|
|
||
|
|
def upgrade() -> None:
|
||
|
|
op.add_column(
|
||
|
|
'listingdecision',
|
||
|
|
sa.Column('price_at_decision', sa.Float(), nullable=True),
|
||
|
|
)
|
||
|
|
|
||
|
|
|
||
|
|
def downgrade() -> None:
|
||
|
|
op.drop_column('listingdecision', 'price_at_decision')
|