Some checks failed
CI / Frontend Lint & Type Check (push) Has been cancelled
CI / Frontend Build (push) Has been cancelled
CI / Backend Lint (push) Has been cancelled
CI / Backend Tests (push) Has been cancelled
CI / Docker Build (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
Deploy / Build & Push Images (push) Has been cancelled
Deploy / Deploy to Server (push) Has been cancelled
Deploy / Notify (push) Has been cancelled
29 lines
903 B
Python
29 lines
903 B
Python
"""Add click_id + destination_url to yield transactions.
|
|
|
|
Revision ID: 011_add_yield_transaction_click_id
|
|
Revises: 010_add_yield_connected_at
|
|
Create Date: 2025-12-15
|
|
"""
|
|
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
revision = "011_add_yield_transaction_click_id"
|
|
down_revision = "010_add_yield_connected_at"
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade() -> None:
|
|
op.add_column("yield_transactions", sa.Column("click_id", sa.String(length=64), nullable=True))
|
|
op.add_column("yield_transactions", sa.Column("destination_url", sa.Text(), nullable=True))
|
|
op.create_index("ix_yield_transactions_click_id", "yield_transactions", ["click_id"], unique=False)
|
|
|
|
|
|
def downgrade() -> None:
|
|
op.drop_index("ix_yield_transactions_click_id", table_name="yield_transactions")
|
|
op.drop_column("yield_transactions", "destination_url")
|
|
op.drop_column("yield_transactions", "click_id")
|
|
|