"""Phase 13.1 — Appointment Engine."""
from alembic import op
from app.core.database import Base
import app.models  # noqa: F401

revision = "0002_phase_131_appointments"
down_revision = "0001_initial"
branch_labels = None
depends_on = None


def upgrade():
    bind = op.get_bind()
    Base.metadata.create_all(bind=bind)


def downgrade():
    bind = op.get_bind()
    for table in (
        "waiting_list_entries",
        "appointments",
        "appointment_types",
        "availability_windows",
        "schedules",
    ):
        op.drop_table(table)
