"""drop_tilled_id_from_customers_and_contacts

Revision ID: prd002_drop_tilled_id
Revises: e1bf0d0f8f27
Create Date: 2026-03-19

"""
from alembic import op
import sqlalchemy as sa

# revision identifiers, used by Alembic.
revision = 'prd002_drop_tilled_id'
down_revision = 'e1bf0d0f8f27'  # latest merge head
branch_labels = None
depends_on = None


def upgrade() -> None:
    # Drop tilled_id from customers table
    op.drop_column('customers', 'tilled_id')
    # Drop tilled_id from customer_contacts table
    op.drop_column('customer_contacts', 'tilled_id')


def downgrade() -> None:
    # Add tilled_id back to customer_contacts table
    op.add_column('customer_contacts', sa.Column('tilled_id', sa.String(50), nullable=True))
    # Add tilled_id back to customers table
    op.add_column('customers', sa.Column('tilled_id', sa.String(255), nullable=True))
