"""add_order_tracking_fields

Revision ID: 55b92e155566
Revises: d2e3f4a5b6c7
Create Date: 2025-12-20 18:07:51.144136

"""
from collections.abc import Sequence

import sqlalchemy as sa

from alembic import op

# revision identifiers, used by Alembic.
revision: str = "55b92e155566"
down_revision: str | None = "d2e3f4a5b6c7"
branch_labels: str | Sequence[str] | None = None
depends_on: str | Sequence[str] | None = None


def upgrade() -> None:
    # Add new tracking fields to orders table
    op.add_column("orders", sa.Column("tracking_url", sa.String(length=500), nullable=True))
    op.add_column("orders", sa.Column("shipment_number", sa.String(length=100), nullable=True))
    op.add_column("orders", sa.Column("shipping_carrier", sa.String(length=50), nullable=True))


def downgrade() -> None:
    op.drop_column("orders", "shipping_carrier")
    op.drop_column("orders", "shipment_number")
    op.drop_column("orders", "tracking_url")
